From ad1d561d9ad914c33aaa2775f3e818a9df843906 Mon Sep 17 00:00:00 2001 From: Grzegorz Godlewski Date: Mon, 19 Aug 2024 16:52:33 +0200 Subject: [PATCH] fix: display stderr when the 'run' fails --- src/run-on-golem/shell-program.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/run-on-golem/shell-program.ts b/src/run-on-golem/shell-program.ts index 8897055..3d7fc14 100644 --- a/src/run-on-golem/shell-program.ts +++ b/src/run-on-golem/shell-program.ts @@ -96,6 +96,10 @@ export function shellProgram(rental: ResourceRental, processContext: ProcessCont const result = await rental.getExeUnit().then((exe) => exe.run(command)); if (result.result !== "Ok") { console.error(`Command error: ${result.message}`); + + if (!options.stderr) { + console.error(result.stderr?.toString()); + } } // TODO: Handle stdout redirect. let stdout = result.stdout as string;