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 one liner curl-bash combo #277

Open
toliver opened this issue May 12, 2016 · 0 comments
Open

Fix one liner curl-bash combo #277

toliver opened this issue May 12, 2016 · 0 comments

Comments

@toliver
Copy link
Contributor

toliver commented May 12, 2016

The problem with premature exit is due to the way we run the script with the one liner.

With

curl -L www.aaa.com | bash

the contents of the file are connected to the std_in of bash. That becomes a problem when we run commands that capture the std_in like apt-get install.

The suggested way to run it is:

bash <(curl -L www.aaa.com)

Then it's run like a script file.

See:
http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
http://askubuntu.com/questions/638686/apt-get-exits-bash-script-after-installing-packages
http://askubuntu.com/questions/372810/how-to-prevent-script-not-to-stop-after-apt-get

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

No branches or pull requests

1 participant