[CMD] Cleanup all batch contexts if the execution loop stopped due to EXIT.

This commit is contained in:
Hermès Bélusca-Maïto 2020-09-27 20:24:38 +02:00
parent 68cb54dc58
commit 895dccd4ac
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -478,6 +478,11 @@ INT Batch(LPTSTR fullname, LPTSTR firstword, LPTSTR param, PARSED_COMMAND *Cmd)
ret = ExecuteCommandWithEcho(Cmd);
FreeCommand(Cmd);
}
if (bExit)
{
/* Stop all execution */
ExitAllBatches();
}
/* Perform top-level batch cleanup */
if (!bc || bTopLevel)