From b398e4044c7e5a1f3684477944bc138915d2c9c5 Mon Sep 17 00:00:00 2001 From: zhangyongsheng Date: Sat, 19 Dec 2020 21:57:15 +0800 Subject: [PATCH] tools: fix update-eslint.sh PR-URL: https://github.com/nodejs/node/pull/36579 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca --- tools/update-eslint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/update-eslint.sh b/tools/update-eslint.sh index f3e43ae31d2101..d0320ab8f841d4 100755 --- a/tools/update-eslint.sh +++ b/tools/update-eslint.sh @@ -9,18 +9,18 @@ cd "$( dirname "$0" )" || exit rm -rf node_modules/eslint -{ +( mkdir eslint-tmp cd eslint-tmp || exit npm init --yes npm install --global-style --no-bin-links --production --no-package-lock eslint@latest - { + ( cd node_modules/eslint || exit npm install --no-bin-links --production --no-package-lock eslint-plugin-markdown@latest - } + ) # Use dmn to remove some unneeded files. @@ -28,7 +28,7 @@ rm -rf node_modules/eslint # Use removeNPMAbsolutePaths to remove unused data in package.json. # This avoids churn as absolute paths can change from one dev to another. npx removeNPMAbsolutePaths@1.0.4 . -} +) mv eslint-tmp/node_modules/eslint node_modules/eslint rm -rf eslint-tmp/