Skip to content

fix(exec): report command success even when terminal restore fails after successful run - #1745

Open
AruneshDwivedi wants to merge 1 commit into
charmbracelet:mainfrom
AruneshDwivedi:fix/exec-terminal-restore-error
Open

fix(exec): report command success even when terminal restore fails after successful run#1745
AruneshDwivedi wants to merge 1 commit into
charmbracelet:mainfrom
AruneshDwivedi:fix/exec-terminal-restore-error

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

When Exec runs a command successfully but RestoreTerminal fails, the callback was receiving the terminal restoration error as if it were the command result. Now the terminal error is sent to p.errs separately while the callback receives nil (command succeeded). This prevents false failure reports in the user's command completion handler.

Used AI to help identify and draft this fix — reviewed and tested before submitting.

…ter successful run

When Exec runs a command successfully but RestoreTerminal fails, the callback
was receiving the terminal restoration error as if it were the command result.
Now the terminal error is sent to p.errs separately while the callback receives
nil (command succeeded). This prevents false failure reports in the user's
command completion handler.

Signed-off-by: Kushal Dwivedi <arunesh.devops@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant