Check if LoggedSubprocess.start() could also use Util.run_logged_p() instead of directly calling run_logged_command()
The LoggedSubprocess.start()
is the only place in project where Util.run_logged_command
is called directly, instead of via run_logged_p
.
The run_logged_p
calls log_command
, which then calls run_logged_command
.
Their (the start()
and run_logged_p()
) actions are very similar. I.e. they both check if pretending, and _setErrorLogfile in case
non zero exit status, and print the exit status in the end (as f"run_logged_p(): {module} {filename} complete: {exitcode}"
and f"{command[0]} complete, result {result}"
).
run_logged_p()
writes f"{module} command logged to {logpath} gave non-zero exit: {return_code}"
in case of non-zero exit status, while start()
does not, and the errors and debug messages are written later after start returns its promise.
Check if the start()
could also use run_logged_p()
instead of directly using run_logged_command()
.
Until that, the debug output contains not consistent messages, i.e. the number of lines starting with
run_logged_command(): ...
is not the same as number of lines starting with
run_logged_p(): ...