From c26ba082aede8b201030dfb0d34a91e01ffd1598 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 10 Jul 2018 22:30:56 -0700 Subject: [PATCH] tools: avoid global install of dmn for lint update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- tools/update-eslint.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index 44f43a05d31e1a..3663ecf74283c0 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