[Mono-list] Windows: Propagating exit codes in .bat files?

Mike Krueger mike@icsharpcode.net
Sun, 02 May 2004 21:07:10 +0200


mono mcs.exe
exit /b %ERRORLEVEL%


>Hey guys,
>   We have an issue with Mono, we are shipping batch files for Windows
>like this:
>c:\>type mcs.bat
>mono mcs.exe
>   The problem is that if `mcs.exe' returns an exitcode different than
>zero, the error is not propagated to the caller, so this means that in
>Makefiles, things keep going even if there is a failure.
>   Anyone knows enough DOS to tell me how to fix that?
>Mono-list maillist  -  Mono-list@lists.ximian.com