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

nodejs: improve nvm error handling #60

Merged
merged 2 commits into from
Dec 11, 2017
Merged

Conversation

cezarsa
Copy link
Member

@cezarsa cezarsa commented Dec 11, 2017

Running nvm with set -e causes error messages to be swallowed because
the script exits before the error message is printed. Now we allow
errors while running nvm and only exit after we've handled the error ourselves.

Now the error of a invalid nodejs version looks like:

$ tsuru app-deploy . -a myapp
Uploading files (0.00MB)... 100.00% Processing. ok
ERROR: `nvm install ">=v8.9.3"` returned exit status 3.
Version '>=v8.9.3' not found - try `nvm ls-remote` to browse available versions.
error running "/var/lib/tsuru/deploy archive file:///home/application/archive.tar.gz": exit status 3
Exit status 1

Related to #54

Running nvm with `set -e` causes error messages to be swallowed because
the script exits before the error message is printed. Now we allow
errors while running nvm and only exit after we've handled the error ourselves.
@cezarsa cezarsa merged commit b7b34fd into tsuru:master Dec 11, 2017
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

Successfully merging this pull request may close these issues.

3 participants