hypha-cli 0.1.2 → 0.1.3
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/postinstall.mjs +5 -2
- package/package.json +1 -1
package/bin/postinstall.mjs
CHANGED
|
@@ -30,9 +30,12 @@ function findConflictingBinaries() {
|
|
|
30
30
|
// Detect user's shell
|
|
31
31
|
const shell = process.env.SHELL || '/bin/sh';
|
|
32
32
|
|
|
33
|
-
//
|
|
33
|
+
// npm runs postinstall in a stripped environment. `zsh -l` (login non-interactive)
|
|
34
|
+
// skips .zshrc where conda/pyenv add PATH entries. We must use `-i` (interactive)
|
|
35
|
+
// to source .zshrc, or explicitly source the rc files.
|
|
34
36
|
for (const cmd of [
|
|
35
|
-
`${shell} -
|
|
37
|
+
`${shell} -i -c 'which -a hypha' 2>/dev/null`, // interactive shell (sources .zshrc/.bashrc)
|
|
38
|
+
`${shell} -l -c 'which -a hypha' 2>/dev/null`, // login shell fallback
|
|
36
39
|
'which -a hypha 2>/dev/null', // plain fallback
|
|
37
40
|
]) {
|
|
38
41
|
try {
|