Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix rvm install #84

Merged
merged 4 commits into from
Apr 14, 2012
Merged

Fix rvm install #84

merged 4 commits into from
Apr 14, 2012

Conversation

xdissent
Copy link
Contributor

@xdissent xdissent commented Apr 5, 2012

A better solution to PR 82: #82

user opts[:user] || "root"
command <<-CODE
bash -c "bash \
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just specify bash here and not have to include line 71, interpreter '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.

Oh, bash instead of script and interpreter. You're totally right. I'll update it, thanks.

@smdern
Copy link
Contributor

smdern commented Apr 5, 2012

Tried out your branch and it works :) Thanks for sorting this out.

@glappen
Copy link

glappen commented Apr 10, 2012

Just tested xdissent's branch and it works - please pull it in!

@xdissent
Copy link
Contributor Author

It looks like RVM is moving to https://rvm.io/ and the official install command has now lost the process substitution that was breaking the chef recipe: curl -L get.rvm.io | bash -s stable. I'll try updating to the new url/command and see how that works.

@griff
Copy link

griff commented Apr 12, 2012

This fix doesn't actually fix the problem it only ignores it.

Bash defaults to ignoring the exit code of any programs it runs so when the script is run and it exits with status 1 the changeset in this pull request simply ignores that value. This is problematic because when the install actually fails it is not reported as such.

If you enable the option for bash to quit when any program returns an error:
set -o errexit
at the start of the code you will see what I am talking about.

The actual problem with the install script is caused by rvm trying to use colors for its terminal output which fails because it hasn't got a real terminal. To fix it you can set the TERM env var to dumb

@xdissent
Copy link
Contributor Author

@griff got it. Fixed, plus changed to new official installer command and URL.

@fnichol fnichol merged commit 66e7fbb into sous-chefs:master Apr 14, 2012
@fnichol
Copy link
Contributor

fnichol commented Apr 14, 2012

Great catch and thanks everyone including @elhu from #82 for the testing and refining. Looks like we should get a stable release out the door now...

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants