On Thu, Oct 9, 2008 at 11:15 AM, Hans Dockter <[EMAIL PROTECTED]> wrote: > Hi Victor, > > On Oct 9, 2008, at 8:00 AM, Victor Ott wrote: > >> Hans, >> >> "exit /B code" did NOT deliver the error code, when I tried it the day >> before yesterday. Only "exit code". >> But I'll take again a look at it. >> > > What we could do is to introduce an environment variable. Let's call it > EXIT_CONSOLE. We would check in the gradle.bat/cmd if this is set. If so we > would trigger an 'exit 1'. The main use case for this are CI servers. With > Bamboo or Teamcity you can easily define such environment variables. In our > test script we could easily set this as well. The normal windows user would > not be affected by this. > > What do you think? > > - Hans
Hans, sorry, I didn't get to reply earlier. Yes, I think it's a good idea. Seems to me that this also the reasoning for http://continuum.apache.org/faqs.html#how-does-continuum-detect-a-successful-build-with-ant (Disclaimer: No, I'm using neither Continuum, nor Maven.) I only wonder if we shouldn't do a similar game like in the link above with and without "/b", e.g.: ========================= rem Set variable EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%EXIT_CONSOLE%" exit %the_code% exit /b %the_code% ========================= This way the return code gets to both callers, interactive and scripted. PS Good "exit" and "errorlevel" overview: http://www.robvanderwoude.com/exit.html Victor --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
