https://bugs.winehq.org/show_bug.cgi?id=57649
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |eric.pouech@gmail.com Status|UNCONFIRMED |ASSIGNED CC| |eric.pouech@gmail.com Ever confirmed|0 |1
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- Created attachment 77785 --> https://bugs.winehq.org/attachment.cgi?id=77785 patch
errorlevel propagation happens "most" of the time (we already have a couple of tests showing that) but we also have to propagate success/failure of last command from child .bat
the non supported case your example shows is something like: - last command of child .bat succeeded, - didn't overwrite the errorlevel, - but errorlevel had been set by a previous command
(so using .cmd extension instead of .bat in test and test2 works!! as set in .cmd always sets errorlevel contrary to .bat where it's only set in case of failure)
note: - I'll have to write likely some more unit tests for this one (to be sure to cover all child termination cases)
attached patch should fix this