summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorJoão Reis <reis@janeasystems.com>2019-09-19 14:25:37 +0100
committerRich Trott <rtrott@gmail.com>2019-09-27 16:45:12 -0700
commit35bfe0e414f4d4b79ca0820c3b0dd41e61d893be (patch)
tree0a825438b45f5234d6b2f4db1918b6c714229d8c /vcbuild.bat
parentaea9a0f77da6a14d4fee2b21b0f4a6a813a01e70 (diff)
downloadandroid-node-v8-35bfe0e414f4d4b79ca0820c3b0dd41e61d893be.tar.gz
android-node-v8-35bfe0e414f4d4b79ca0820c3b0dd41e61d893be.tar.bz2
android-node-v8-35bfe0e414f4d4b79ca0820c3b0dd41e61d893be.zip
build,win: goto lint only after defining node_exe
When running `vcbuild lint` on a new prompt where vcbuild was not run before, `%node_exe%` was not defined and `eslint.js`, `lint-js.js` and `lint-md.js` would be run directly using the program defined in Windows (usually the Windows Scripting Host or Notepad). This moves the goto statement to after `%node_exe%` is defined. Fixes: https://github.com/nodejs/node/issues/29602 PR-URL: https://github.com/nodejs/node/pull/29616 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat9
1 files changed, 4 insertions, 5 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index 86b2f1e3c9..72f20a4835 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -152,10 +152,6 @@ goto next-arg
:args-done
-if "%*"=="lint" (
- goto lint-cpp
-)
-
if defined build_release (
set config=Release
set package=1
@@ -178,6 +174,9 @@ set "npm_exe="%~dp0%node_exe%" %~dp0deps\npm\bin\npm-cli.js"
if "%target_env%"=="vs2017" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2017"
if "%target_env%"=="vs2019" set "node_gyp_exe=%node_gyp_exe% --msvs_version=2019"
+:: skip building if the only argument received was lint
+if "%*"=="lint" if exist "%node_exe%" goto lint-cpp
+
if "%config%"=="Debug" set configure_flags=%configure_flags% --debug
if defined nosnapshot set configure_flags=%configure_flags% --without-snapshot
if defined noetw set configure_flags=%configure_flags% --without-etw& set noetw_msi_arg=/p:NoETW=1
@@ -641,7 +640,7 @@ if not defined lint_cpp goto lint-js
if defined NODEJS_MAKE goto run-make-lint
where make > NUL 2>&1 && make -v | findstr /C:"GNU Make" 1> NUL
if "%ERRORLEVEL%"=="0" set "NODEJS_MAKE=make PYTHON=python" & goto run-make-lint
-where wsl > NUL 2>1
+where wsl > NUL 2>&1
if "%ERRORLEVEL%"=="0" set "NODEJS_MAKE=wsl make" & goto run-make-lint
echo Could not find GNU Make, needed for linting C/C++
goto lint-js