summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-07-10 22:30:56 -0700
committerRich Trott <rtrott@gmail.com>2018-07-12 23:04:05 -0700
commit19bc893c7559ed53d17b9cdc372fc9614f2deda9 (patch)
tree4d1a3a8701381699f91ebfb59c124f81d9990511 /tools
parent8cae9b2ff808198b4451d9de634320fa5750c4cd (diff)
downloadandroid-node-v8-19bc893c7559ed53d17b9cdc372fc9614f2deda9.tar.gz
android-node-v8-19bc893c7559ed53d17b9cdc372fc9614f2deda9.tar.bz2
android-node-v8-19bc893c7559ed53d17b9cdc372fc9614f2deda9.zip
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/update-eslint.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh
index 44f43a05d3..3663ecf742 100755
--- a/tools/update-eslint.sh
+++ b/tools/update-eslint.sh
@@ -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