Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Avoid shell mangling during eslint --init (#8936)
If you ran ‘eslint --init’ and selected the Google style guide, it would end up calling execSync("npm i --save-dev eslint@>=4.1.1"). Because execSync spawns the child through a shell, this had the effect of running ‘npm i --save-dev eslint@’ with its output redirected to a new file named ‘=4.1.1’, leaving the wrong version in package.json. Fix this by spawning processes using the cross-spawn package, which avoids spawning a shell at all on Unix and quotes the arguments appropriately on Windows. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
- Loading branch information
1 parent
10c3d78
commit 55bc35d
Showing
3 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters