Skip to content

Commit 39846c1

Browse files
committed
test: use no-save and no-package-lock flags
Use these flags when running make coverage so that a package-lock.json file is not generated and npm does not attempt to save the deps to a non-existent package.json file Refs: https://github.com/nodejs/node/pull/15190/files#r136932786
1 parent 565ad7f commit 39846c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ check: test
120120
# in place
121121
coverage-clean:
122122
if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi
123-
$(RM) package-lock.json
124123
$(RM) -r node_modules
125124
$(RM) -r gcovr testing
126125
$(RM) -r out/$(BUILDTYPE)/.coverage
@@ -140,8 +139,9 @@ coverage: coverage-test
140139
coverage-build: all
141140
mkdir -p node_modules
142141
if [ ! -d node_modules/istanbul-merge ]; then \
143-
$(NODE) ./deps/npm install istanbul-merge; fi
144-
if [ ! -d node_modules/nyc ]; then $(NODE) ./deps/npm install nyc; fi
142+
$(NODE) ./deps/npm install istanbul-merge --no-save --no-package-lock; fi
143+
if [ ! -d node_modules/nyc ]; then \
144+
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
145145
if [ ! -d gcovr ]; then git clone --depth=1 \
146146
--single-branch git://github.com/gcovr/gcovr.git; fi
147147
if [ ! -d testing ]; then git clone --depth=1 \

0 commit comments

Comments
 (0)