[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

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)