Skip to content

Commit 510caaa

Browse files
stengerhhyperblast
authored andcommitted
apply-patches.cmd: propagate exit code on error
1 parent 289733b commit 510caaa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

server/extlibs/apply-patches.cmd

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
@set src_dir=%~dp0%1
44

55
@call :apply_patches "%src_dir%\patches"
6+
if %errorlevel% neq 0 goto :error
67
@call :apply_patches "%src_dir%\patches.windows"
8+
if %errorlevel% neq 0 goto :error
79
@call :copy_files "%src_dir%\files"
10+
if %errorlevel% neq 0 goto :error
811
@call :copy_files "%src_dir%\files.windows"
12+
if %errorlevel% neq 0 goto :error
913

1014
@goto :end
1115

@@ -28,6 +32,9 @@
2832
:usage
2933
@echo usage: %~nx0 target
3034
@echo.
31-
@cmd /c exit 1
35+
@exit /b 1
36+
37+
:error
38+
@exit /b %errorlevel%
3239

3340
:end

0 commit comments

Comments
 (0)