deno_task_shell
deno_task_shell copied to clipboard
Support `wait` command to wait for all async commands.
Support the wait keyword like bash&sh does to allow waiting for async commands to complete.
That way, you can run commands in parallel and wait for all to finish before the task quits.
Or does the task just not exit if not all of the async commands are completed? The the manual should maybe be updated?
Or does the task just not exit if not all of the async commands are completed?
The task exits when all the async commands have completed. What would be nice is a way to return a non-zero exit code if one of the async commands fails. I'm not sure the best way to do that... maybe with wait?
I agree, it would make sense if wait passed the exit code, but without wait, the task ignores the exit code(s).
I wonder if by default it should not ignore the exit codes for async commands. So if you do:
cmd1 & cmd2 & cmd3
The exit code would be cmd3's if non-zero, then either cmd1 or cmd2 if non-zero.
To override, someone could do:
cmd1 || exit 0 & cmd 2 || exit 0 & cmd3
I wonder though if this should kill the other commands on the first non-zero exit code or if it should wait for them to complete.
That seems like a good default.