Skip to content

Commit 5df2022

Browse files
IvanGoncharovkassens
authored andcommitted
Fix yarn cmd. check the length of npm_config_argv in prepublish (#195)
1 parent a71defa commit 5df2022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/prepublish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Because of a long-running npm issue (https://github.com/npm/npm/issues/3059)
22
# prepublish runs after `npm install` and `npm pack`.
33
# In order to only run prepublish before `npm publish`, we have to check argv.
4-
if node -e "process.exit(($npm_config_argv).original[0].indexOf('pu') === 0)"; then
4+
if node -e "process.exit(($npm_config_argv).original.length > 0 && ($npm_config_argv).original[0].indexOf('pu') === 0)"; then
55
exit 0;
66
fi
77

0 commit comments

Comments
 (0)