-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: fix make
invocation in tools.yml
#40890
Conversation
Fast-track has been requested by @Trott. Please 👍 to approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to SC2103, we should rewrite:
cd tools/lint-md
NEW_VERSION=$(npm outdated --omit=dev --parseable | cut -d: -f4 | xargs)
if [ "$NEW_VERSION" != "" ]; then
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
rm -rf package-lock.json node_modules && npm install --ignore-scripts
cd ../..
make lint-md-rollup
fi
into
NEW_VERSION=$(cd tools/lint-md && npm outdated --omit=dev --parseable | cut -d: -f4 | xargs)
if [ "$NEW_VERSION" != "" ]; then
echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_ENV"
(cd tools/lint-md && rm -rf package-lock.json node_modules && npm install --ignore-scripts)
make lint-md-rollup
fi
For reasons I can get into if you want, I'm going with their other remediation suggestion which is to add |
Thinking more about it and looking at the code, I don't think we should do either the subshell or the GitHub Actions run with Adding Using a subshell is similarly unnecessary and unwieldy. It's not bad with the code rewrite you have above, but with the fix for the bug I found, it gets confusing because we need to run cd tools/lint-md
npm ci
NEW_VERSION=$(npm outdated --parseable | cut -d: -f4 | xargs) @aduh95 What do you think? |
Be in the correct directory for `make lint-md-rollup`.
5206fb5
to
be62f1e
Compare
If we had been using subshells from the start, it would have been very hard to run |
Landed in bad6526 |
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>
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>
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>
Be in the correct directory for
make lint-md-rollup
.Refs: https://github.com/nodejs/node/runs/4270533399?check_suite_focus=true