#26 Un/RegisterService should return error code on failure

open-accepted
nobody
None
5
2011-11-12
2011-11-11
David M. Lee
No

If --WinRun4J:UnregisterService or --WinRun4J:RegisterService fails, it still returns an error code of 0, indicating success. It should return a non-zero code to indicate failure.

C:\Users\dlee\whatever>operator.exe --WinRun4J:Reg
isterService
[info] Module Name: C:\Users\dlee\Desktop\op-server-0.0.1.0-SNAPSHOT\bin\operato
r.exe
[info] Module INI: C:\Users\dlee\Desktop\op-server-0.0.1.0-SNAPSHOT\bin\operator
.ini
[info] Module Dir: C:\Users\dlee\Desktop\op-server-0.0.1.0-SNAPSHOT\bin\ [info] INI Dir: C:\Users\dlee\Desktop\op-server-0.0.1.0-SNAPSHOT\bin\ [info] Registering Service...
[err] Service ID not specified

C:\Users\dlee\whatever>echo %ERRORLEVEL%
0

Discussion

  • Peter Smith
    Peter Smith
    2011-11-12

    Agreed, thanks for the bug report.

     
  • Peter Smith
    Peter Smith
    2011-11-12

    • status: open --> open-accepted