Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postinstall script can fail on windows during install #147

Open
steven-hoffman-jomashop opened this issue Dec 13, 2024 · 0 comments
Open

Comments

@steven-hoffman-jomashop

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'

  • 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant