Use upgrade rather than install

This commit is contained in:
Bob Mottram 2017-04-02 11:42:07 +01:00
parent 64f7975df6
commit d37e7f3888
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ function upgrade_nodejs {
CURR_NPM_VERSION=$(npm --version) CURR_NPM_VERSION=$(npm --version)
CURR_N_VERSION=$(n --version) CURR_N_VERSION=$(n --version)
if [[ "$CURR_NPM_VERSION" != "$NPM_VERSION" ]]; then if [[ "$CURR_NPM_VERSION" != "$NPM_VERSION" ]]; then
npm install -g npm@${NPM_VERSION} --save npm upgrade -g npm@${NPM_VERSION} --save
fi fi
if [[ "$CURR_N_VERSION" != "$NODEJS_N_VERSION" ]]; then if [[ "$CURR_N_VERSION" != "$NODEJS_N_VERSION" ]]; then
npm upgrade -g n@${NODEJS_N_VERSION} --save npm upgrade -g n@${NODEJS_N_VERSION} --save