You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Postinstall script can fail on windows during install
Expected outcome
postinstall script does not fail
Actual outcome
postinstall script fails
Steps to reproduce
run in windows: yarn run postinstall || echo 'Fail'
npm appears to handle the error (or otherwise does not fail)
Possible Fix
Wrap existing postinstall script in sh -c '...' "postinstall": "sh -c 'FILE=\"$(npm root)/@reallyland/tools/postinstall.sh\"; if [ -f \"$FILE\" ]; then sh \"$FILE\"; fi'",
This will still require sh for install, but a user can have that on the path.
(You could also convert to what pure-js does; which is to use a node script, here that can just spawn back to sh)
The text was updated successfully, but these errors were encountered:
Description
Postinstall script can fail on windows during install
Expected outcome
postinstall script does not fail
Actual outcome
postinstall script fails
Steps to reproduce
run in windows:
yarn run postinstall || echo 'Fail'
Possible Fix
Wrap existing postinstall script in sh -c '...'
"postinstall": "sh -c 'FILE=\"$(npm root)/@reallyland/tools/postinstall.sh\"; if [ -f \"$FILE\" ]; then sh \"$FILE\"; fi'",
This will still require
sh
for install, but a user can have that on the path.(You could also convert to what pure-js does; which is to use a node script, here that can just spawn back to sh)
The text was updated successfully, but these errors were encountered: