Skip to content

Commit

Permalink
moved the cmdOutput to runRemoteCommand function for all the commands
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshzarkar9 committed Jul 9, 2024
1 parent d7c7585 commit 6af4520
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/spec-common/injectHeadless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,6 @@ async function runLifecycleCommand({ lifecycleHook }: ResolverParameters, contai
if (err && (err.code === 130 || err.signal === 2)) { // SIGINT seen on darwin as code === 130, would also make sense as signal === 2.
infoOutput.raw(`\r\n\x1b[1m${lifecycleHookName} interrupted.\x1b[0m\r\n\r\n`);
} else {
if (err.cmdOutput) {
infoOutput.write(toErrorText(`${err.cmdOutput}`));
}
if (err?.code) {
infoOutput.write(toErrorText(`${lifecycleHookName} failed with exit code ${err.code}. Skipping any further user-provided commands.`));
}
Expand Down Expand Up @@ -644,7 +641,7 @@ export async function runRemoteCommand(params: { output: Log; onDidInput?: Event
}
if (exit.code || exit.signal) {
return Promise.reject({
message: `Command failed: ${cmd.join(' ')}`,
message: `Command failed: ${cmd.join(' ')}\r\n\r\n${cmdOutput}`,
cmdOutput,
code: exit.code,
signal: exit.signal,
Expand Down

0 comments on commit 6af4520

Please sign in to comment.