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

Fix postinstall script of detox on sh #723

Closed
wants to merge 1 commit into from

Conversation

jhen0409
Copy link
Contributor

@jhen0409 jhen0409 commented May 11, 2018

Related to #627 (comment).

We can reproduce the issue by the following script:

$ sh -c "touch script.sh && chmod +x script.sh && script.sh"
# sh: script.sh: command not found

@jhen0409 jhen0409 requested a review from rotemmiz as a code owner May 11, 2018 14:50
@jhen0409 jhen0409 force-pushed the fix-script-linux branch from dbeb538 to 8965333 Compare May 12, 2018 07:31
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @jhen0409
Is there a reason you removed the -e flag ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may unnecessary for the current case, but I'll add back it to be consistent. 👍

@jhen0409 jhen0409 force-pushed the fix-script-linux branch from 8965333 to 071ac36 Compare May 13, 2018 12:40
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/sh -e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed to sh from bash? Not saying bash is absolutely needed here, but I don't think there is a linux installation that comes without bash?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alpine Linux doesn't have bash by default (it is still installable), that's why it launch scripts by sh. We use it because its image size.

@rotemmiz
Copy link
Contributor

postinstall now uses node script to support Windows as well as Linux and macOS.
Please check if this solves your issue (as soon as a new release is published), If you still have problems, please report an issue/submit a PR.
In the meantime, I am closing this PR.

@rotemmiz rotemmiz closed this May 29, 2018
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants