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

Ensure install.sh exits if either of OTP or Elixir fails to install #1782

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

zachallaun
Copy link
Contributor

This script uses set -e to immediately exit the program if any commands return non-zero, but wait without arguments does not reliably return with the exit code of a failed subprocess. (Exactly which exit code is returned depends, I believe, on the order in which the subprocesses exit.)

By waiting on both pids explicitly, we ensure that the script exits if either OTP or Elixir fails to install. In the case of #1781, this change makes it so that the script halts after the curl fails to download OTP master instead of carrying on as if nothing failed.

@zachallaun
Copy link
Contributor Author

Note that I didn't change install.bat because it does not install in parallel and so doesn't have this issue.

@josevalim
Copy link
Member

cc @wojtekmach

@josevalim josevalim merged commit b0c034a into elixir-lang:main Nov 14, 2024
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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

Successfully merging this pull request may close these issues.

3 participants