Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent a previously set ErrorLevel env var from preventing result codes #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barries
Copy link

@barries barries commented Mar 15, 2017

Turns out batch files need to clear the ErrorLevel env var, lest a prior batch file's results prevent correct result codes from this invocation.

@Leont
Copy link
Member

Leont commented Mar 15, 2017

@haarg @wchristian @dolmen Opinions?

@haarg
Copy link
Member

haarg commented Mar 15, 2017

Looks correct. If an ERRORLEVEL environment variable is set, %ERRORLEVEL% will use that rather than giving the exit status. And Win32 has no concept of an existing but empty environment variable, so set VAR= deletes the variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants