Skip to content

Commit a09bc8b

Browse files
Trottdanielleadams
authored andcommitted
build: fix make invocation in tools.yml
Be in the correct directory for `make lint-md-rollup`. PR-URL: #40890 Refs: https://github.com/nodejs/node/runs/4270533399?check_suite_focus=true Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent ab398b6 commit a09bc8b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/tools.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,17 @@ jobs:
3535
- id: "lint-md dependencies"
3636
run: |
3737
cd tools/lint-md
38-
NEW_VERSION=$(npm outdated --omit=dev --parseable | cut -d: -f4 | xargs)
38+
npm ci
39+
NEW_VERSION=$(npm outdated --parseable | cut -d: -f4 | xargs)
3940
if [ "$NEW_VERSION" != "" ]; then
4041
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
41-
rm -rf package-lock.json node_modules && npm install --ignore-scripts
42+
rm -rf package-lock.json node_modules
43+
# Include $NEW_VERSION to explicitly update the package.json
44+
# entry for the dependency and also so that semver-major updates
45+
# are not skipped.
46+
npm install --ignore-scripts $NEW_VERSION
47+
npm install --ignore-scripts
48+
cd ../..
4249
make lint-md-rollup
4350
fi
4451
steps:

0 commit comments

Comments
 (0)