Skip to content

Commit a4a3976

Browse files
committed
Replace install with ci
Will now fail on lock file being out of sync, e.g. npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
1 parent 22a02df commit a4a3976

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

bin/npm-install-if-needed.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ then
1010
PARENT="$(git log --pretty=%P -n 1 HEAD)"
1111
if [[ "$GIT_TEST_PREVIOUS_CHECKED_OUT_COMMIT" = "$PARENT" ]]
1212
then
13-
# ... and package.json has not changed then skip running npm install.
14-
git diff --quiet "$PARENT" -- package.json || npm install
13+
# ... and package.json has not changed then skip running npm ci.
14+
git diff --quiet "$PARENT" -- package.json || npm ci
1515
else
16-
npm install
16+
npm ci
1717
fi
1818
else
19-
npm install
19+
npm ci
2020
fi

0 commit comments

Comments
 (0)