tools: fix update-eslint.sh

The script currently assumes that there is a package.json in
`eslint-tmp`. If there isn't the logic of the script fails.
This adds a call to `npm init --yes` ensuring there is a package.json
and that the script can do it's thing.

PR-URL: https://github.com/nodejs/node/pull/14850
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
This commit is contained in:
Myles Borins
2017-08-16 00:03:45 -07:00
parent 2062a69879
commit fb732561a8

View File

@@ -11,6 +11,7 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"
rm -rf eslint
mkdir eslint-tmp
cd eslint-tmp
npm init --yes
npm install --global-style --no-bin-links --production eslint@latest
cd node_modules/eslint