geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <>
Subject [jira] Commented: (GERONIMO-4525) No effective exit code for all Windows commands
Date Fri, 06 Feb 2009 19:48:59 GMT


Jarek Gawor commented on GERONIMO-4525:

I committed some changes based on your patch to trunk (revision 741689) that I would like
you to review before merging to branches/2.1. There were two issues with the patch:

1) We can't just call seterrorlevel.bat file. That assumes the batch file exists in the current
working directory so running any Geronimo script from directory outside Geronimo bin directory
would fail (at least in some cases). 

2) Calling seterrorlevel.bat 0 is unnecessary. A call to @setlocal enableextensions will reset

3) A call to cmd /c exit /b %errorlevel% at the end of the batch files also seems unnecessary.
If errorlevel is already set why set it again?

> No effective exit code for all Windows commands
> -----------------------------------------------
>                 Key: GERONIMO-4525
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: commands
>    Affects Versions: 2.1.3
>         Environment: MS Windows
>            Reporter: Jack Cai
>            Assignee: Jarek Gawor
>             Fix For: 2.1.4, 2.2
>         Attachments: Geronimo-4525_Jack.patch
> There are multiple problems in the current Windows batch commands (including geronimo.bat,
startup.bat, etc.)
>  - It's not recommended to define an environment variable with the name ERRORLEVEL. See
>  - Set a value to ERRORLEVEL has no effect to the exit code of the batch command (so
the documented exit code "0" and "1" are not actually there).
>  - The value of the ERRORLEVEL variable will also get unset when the "@endlocal" command
is called.
> [1]

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message