mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
fix: handle undefined exit codes in terminal output
When a terminal command completes with an undefined exit code: - Add explicit handling for undefined exit code case - Include clear message in output that exit code is undefined - Notify user to help diagnose potential terminal issues This helps identify and debug cases where the terminal process completes but the exit code is not properly captured. Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
This commit is contained in:
parent
4e0f868261
commit
8b8c4fde50
1 changed files with 3 additions and 1 deletions
|
|
@ -1023,6 +1023,9 @@ export class Cline {
|
|||
if (exitDetails.coreDumpPossible) {
|
||||
exitStatus += " - core dump possible"
|
||||
}
|
||||
} else if (exitDetails.exitCode === undefined) {
|
||||
result += "<VSCE exit code is undefined: terminal output and command execution status is unknown.>"
|
||||
exitStatus = `Exit code: <undefined, notify user>`
|
||||
} else {
|
||||
exitStatus = `Exit code: ${exitDetails.exitCode}`
|
||||
}
|
||||
|
|
@ -1030,7 +1033,6 @@ export class Cline {
|
|||
const workingDirInfo = workingDir ? ` from '${workingDir.toPosix()}'` : ""
|
||||
|
||||
const outputInfo = `\nOutput:\n${result}`
|
||||
|
||||
return [
|
||||
false,
|
||||
`Command executed in terminal ${terminalInfo.id}${workingDirInfo}. ${exitStatus}${outputInfo}`,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue