Skip to content

Commit 112247c

Browse files
committed
fix(jsShell): improve error handling by adjusting error message order
1 parent 40c75aa commit 112247c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/jsShell.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export function jsShell<T extends string | string[]>(
100100
if (isLog)
101101
console.error(`Command failed with status ${status}`)
102102
if (errorExit) {
103-
reject(new Error(errorOutput || result))
103+
reject(new Error(result || errorOutput))
104104
process.exit(1)
105105
}
106106
else {
107-
resolve({ status, result: errorOutput || result, pid })
107+
resolve({ status, result: result || errorOutput, pid })
108108
}
109109
}
110110
else {

0 commit comments

Comments
 (0)