Skip to content

Commit

Permalink
fix: display stderr when the 'run' fails
Browse files Browse the repository at this point in the history
grisha87 committed Aug 19, 2024

Verified

This commit was signed with the committer’s verified signature.
noroadsleft James Young
1 parent 11abce9 commit ad1d561
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/run-on-golem/shell-program.ts
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit ad1d561

Please sign in to comment.