Skip to content

Commit

Permalink
build: do not cd on vcbuild help
Browse files Browse the repository at this point in the history
`vcbuild help` just outputs help info and exits.

If a user calls this command not from a project root,
the directory change can be unexpected and unwanted.

PR-URL: #19291
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
vsemozhetbyt authored and MylesBorins committed Mar 20, 2018
1 parent 7f652c2 commit 3f7c4ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vcbuild.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@if not defined DEBUG_HELPER @ECHO OFF

cd %~dp0

if /i "%1"=="help" goto help
if /i "%1"=="--help" goto help
if /i "%1"=="-help" goto help
Expand All @@ -11,6 +9,8 @@ if /i "%1"=="-?" goto help
if /i "%1"=="--?" goto help
if /i "%1"=="/?" goto help

cd %~dp0

@rem Process arguments.
set config=Release
set target=Build
Expand Down

0 comments on commit 3f7c4ee

Please sign in to comment.