Skip to content

Commit 1482c44

Browse files
Trotttargos
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 4288c6a commit 1482c44

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/tools.yml

+9-2
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)