Skip to content

Commit

Permalink
fix(win32): Fixed errorlevel expansion (#163)
Browse files Browse the repository at this point in the history
Without delayed-expansion the value of %errorlevel% gets expanded before the execution of csc.
  • Loading branch information
timlg07 authored and bencevans committed May 30, 2020
1 parent 3957829 commit 8194117
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/win32/screenCapture_1.3.2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
:batch
@echo off
setlocal
setlocal enableDelayedExpansion

:: find csc.exe
set "csc="
Expand All @@ -15,7 +15,7 @@ if not exist "%csc%" (

if not exist "%~n0.exe" (
call %csc% /nologo /r:"Microsoft.VisualBasic.dll" /win32manifest:"app.manifest" /out:"%~n0.exe" "%~dpsfnx0" || (
exit /b %errorlevel%
exit /b !errorlevel!
)
)
%~n0.exe %*
Expand Down

0 comments on commit 8194117

Please sign in to comment.