Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

Additional fix for potentially unbound variables in bash strict mode#1516

Merged
ljharb merged 1 commit intonvm-sh:masterfrom
phanect:strict
Apr 28, 2017
Merged

Additional fix for potentially unbound variables in bash strict mode#1516
ljharb merged 1 commit intonvm-sh:masterfrom
phanect:strict

Conversation

@phanect
Copy link
Contributor

@phanect phanect commented Apr 27, 2017

I noticed #1363 is not fixed completely.
This PR fixes additional causes.

…ed unchecked.

This commit is follow up for 853afbf.
Fixes remaining bug in #1363
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks!

nvm.sh Outdated
if nvm_is_version_installed "$VERSION"; then
nvm_err "$VERSION is already installed."
if nvm use "$VERSION" && [ ! -z "$REINSTALL_PACKAGES_FROM" ] && [ "_$REINSTALL_PACKAGES_FROM" != "_N/A" ]; then
if nvm use "$VERSION" && [ ! -z "${REINSTALL_PACKAGES_FROM-}" ] && [ "_$REINSTALL_PACKAGES_FROM" != "_N/A" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

let's change this ! -z to -n while we're at it :-)

Copy link
Contributor Author

@phanect phanect Apr 28, 2017

Choose a reason for hiding this comment

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

Oh, yes, that's better.
I've fixed it.

nvm.sh Outdated
nvm_ensure_default_set "$provided_version"
fi
if [ ! -z "$REINSTALL_PACKAGES_FROM" ] \
if [ ! -z "${REINSTALL_PACKAGES_FROM-}" ] \
Copy link
Member

Choose a reason for hiding this comment

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

this one too

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks!

@ljharb ljharb merged commit caa7de3 into nvm-sh:master Apr 28, 2017
@phanect phanect deleted the strict branch April 30, 2017 09:35
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.

2 participants