electrobun 2.0.1-beta.15 → 2.0.1-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/electrobun.cjs +6 -4
- package/package.json +1 -1
package/bin/electrobun.cjs
CHANGED
|
@@ -11,7 +11,9 @@ const installerBaseUrl = "https://hutch.blackboard.sh/hutch";
|
|
|
11
11
|
const maxInstallerBytes = 1024 * 1024;
|
|
12
12
|
const maxInstallerRedirects = 5;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// Hutch owns a separate release-channel contract: its stable executable is
|
|
15
|
+
// still published under Hutch's "production" channel.
|
|
16
|
+
function normalizeHutchChannel(value) {
|
|
15
17
|
if (value === "stable") return "production";
|
|
16
18
|
if (value === "production" || value === "canary") return value;
|
|
17
19
|
return null;
|
|
@@ -19,7 +21,7 @@ function normalizeChannel(value) {
|
|
|
19
21
|
|
|
20
22
|
function hutchChannel(environment) {
|
|
21
23
|
for (const key of ["ELECTROBUN_HUTCH_CHANNEL", "HUTCH_ACTIVE_CHANNEL"]) {
|
|
22
|
-
const selected =
|
|
24
|
+
const selected = normalizeHutchChannel(environment[key]);
|
|
23
25
|
if (selected) return selected;
|
|
24
26
|
}
|
|
25
27
|
return "production";
|
|
@@ -39,14 +41,14 @@ function hutchBinaryPath(channel, environment, platform, userHome) {
|
|
|
39
41
|
return environment.ELECTROBUN_HUTCH_BINARY;
|
|
40
42
|
}
|
|
41
43
|
|
|
44
|
+
const pathApi = platform === "win32" ? path.win32 : path.posix;
|
|
42
45
|
// HUTCH_HOME is Hutch's own home; DASH_HOME stays honored as a deprecated
|
|
43
46
|
// fallback for Dash Desktop and older setups.
|
|
44
47
|
const hutchHome =
|
|
45
48
|
environment.HUTCH_HOME ||
|
|
46
49
|
environment.DASH_HOME ||
|
|
47
|
-
|
|
50
|
+
pathApi.join(userHome, ".hutch");
|
|
48
51
|
const command = channel === "canary" ? "hutch-canary" : "hutch";
|
|
49
|
-
const pathApi = platform === "win32" ? path.win32 : path.posix;
|
|
50
52
|
return pathApi.join(
|
|
51
53
|
hutchHome,
|
|
52
54
|
"bin",
|