Commit acf4525
committed
Add $npm_config_shell fallback in version script
Due to [RFC 21], in npm@^7 default configs are no longer included in the
script environment. Therefore, if shell is not explicitly configured,
`$npm_config_shell` will be unset.
Handle this by falling back to $SHELL (the shell from which npm was
invoked), or to bash if both are unset.
[RFC 21]: https://github.com/npm/rfcs/blob/latest/implemented/0021-reduce-lifecycle-script-environment.md
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>1 parent 27b6f44 commit acf4525
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments