Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit f5831e9

Browse files
committed
fix(plugins/plugin-bash-like): PTY error messages may not reach users in all case
Fixes #5328
1 parent fc3a311 commit f5831e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/plugin-bash-like/src/lib/cmds/catchall.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ export async function doExecWithStdoutViaPty<O extends ParsedOptions = ParsedOpt
134134

135135
await dispatchToShell(myArgs).catch(err => {
136136
console.error(err)
137+
138+
// if the PTY emitted anything on stdout, use this as the message
139+
err.message = stdout || err.message
140+
137141
reject(err)
138142
})
139143

0 commit comments

Comments
 (0)