Don't return immediately when called from a Windows batch/powershell script
It seems that when a Clean program is started from a Windows batch or powershell script, that script can continue without waiting for the Clean program to finish. That may be useful in some cases(?), but in others it isn't. It took some time before I realized that
cpm.exe project.prj
in my continuous integration script should really be
start-process -wait -nonewwindow -filepath cpm.exe -argumentlist project.prj
because otherwise the next steps would fail as building had not been finished yet. (Also the output of cpm would be interleaved with output of subsequent commands without this change.)
According to https://stackoverflow.com/a/13258451 it depends on the executable whether the script can continue or not (under "Using call <prog>
"):
For an exe-prog the caller batch waits or starts the exe asynchronous, but the behaviour depends on the exe itself.
So is it possible to either make the default synchronous, or add an option in the project file to enable/disable this (assuming it is not yet possible)?
(@baslijns perhaps this can also help to make the output of the build scripts more understandable.)