tools: avoid global install of dmn for lint update
When updating ESLint, use npx to run dmn rather than installing dmn globally. PR-URL: https://github.com/nodejs/node/pull/21744 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
8cae9b2ff8
commit
19bc893c75
@ -2,7 +2,7 @@
|
||||
|
||||
# Shell script to update ESLint in the source tree to the latest release.
|
||||
|
||||
# Depends on npm and node being in $PATH.
|
||||
# Depends on npm, npx, and node being in $PATH.
|
||||
|
||||
# This script must be be in the tools directory when it runs because it uses
|
||||
# $BASH_SOURCE[0] to determine directories to work in.
|
||||
@ -19,11 +19,8 @@ cd node_modules/eslint
|
||||
npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@next
|
||||
cd ../..
|
||||
|
||||
# Install dmn if it is not in path.
|
||||
type -P dmn || npm install -g dmn
|
||||
|
||||
# Use dmn to remove some unneeded files.
|
||||
dmn -f clean
|
||||
npx dmn -f clean
|
||||
|
||||
cd ..
|
||||
mv eslint-tmp/node_modules/eslint node_modules/eslint
|
||||
|
Loading…
x
Reference in New Issue
Block a user