libutil: improve runProgram2 log message

include argv0 if needed and program path at all times.

Change-Id: Icc5e28e32334e22f67fd58bd88784d4ddd5e583a
This commit is contained in:
eldritch horrors
2026-02-07 20:34:49 +01:00
parent 684aba046a
commit 909cbb0e40
+9 -1
View File
@@ -354,7 +354,15 @@ RunningProgram runProgram2(const RunOptions & options)
ProcessOptions processOptions{};
printMsg(lvlChatty, "running command: %s", concatMapStringsSep(" ", options.args, shellEscape));
printMsg(
lvlChatty,
"running command%s%s: %s %s%s",
Uncolored(options.searchPath ? " from PATH" : ""),
Uncolored(options.argv0 ? " with explicit argv0" : ""),
shellEscape(options.program),
options.argv0 ? shellEscape(*options.argv0) + " " : "",
concatMapStringsSep(" ", options.args, shellEscape)
);
/* Fork. */
Pid pid{startProcess(