picosh 0.1.6 → 0.1.7
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/package.json +1 -1
- package/scripts/postinstall.js +10 -2
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -11,6 +11,11 @@ const HYPER_CLI_PATHS = [
|
|
|
11
11
|
'/usr/local/bin/hyper',
|
|
12
12
|
];
|
|
13
13
|
|
|
14
|
+
const HYPER_CONFIG_PATHS = [
|
|
15
|
+
path.join(os.homedir(), 'AppData', 'Roaming', 'Hyper', 'config.json'),
|
|
16
|
+
path.join(os.homedir(), '.hyper.js'),
|
|
17
|
+
];
|
|
18
|
+
|
|
14
19
|
function findHyperCli() {
|
|
15
20
|
return HYPER_CLI_PATHS.find((p) => fs.existsSync(p));
|
|
16
21
|
}
|
|
@@ -42,8 +47,11 @@ if (!cli) {
|
|
|
42
47
|
cli = findHyperCli();
|
|
43
48
|
}
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
const configExists = HYPER_CONFIG_PATHS.some((p) => fs.existsSync(p));
|
|
51
|
+
|
|
52
|
+
if (!cli || !configExists) {
|
|
53
|
+
console.error('[picosh] Hyper installed!');
|
|
54
|
+
console.error('[picosh] Launch Hyper once to initialize, then run: hyper i picosh');
|
|
47
55
|
process.exit(0);
|
|
48
56
|
}
|
|
49
57
|
|