Conversation
Remove COMMAND_HAD_STDERR from error detection logic because many R functions (e.g., install.packages) write informational messages to stderr that are not errors. Error detection now relies solely on R's error handling mechanism: - CONDITION_ERROR_OCCURRED via globalCallingHandlers - R-side error state via options(error = ...) handler This fixes the issue where install.packages showed a failure indicator in the prompt even when the package was installed successfully. Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR refines error detection in the embedded R runtime by removing stderr-based heuristics that caused false positives, and relying instead on R’s own error-handling state.
Changes:
- Removed
COMMAND_HAD_STDERRtracking and all related logic fromreset_command_error_state,command_had_error, andr_write_console_ex, so stderr output no longer influences error detection. - Updated the
command_had_errordocumentation to describe the new behavior based solely on R’s condition system andoptions(error = ...)-driven error state, explicitly noting why stderr is not used. - Adjusted tests in
sys.rsto validate the updated error-tracking behavior (usingmark_error_conditionand R-side error state) and removed tests that depended on stderr-driven error flags.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eitsupi
added a commit
that referenced
this pull request
Feb 11, 2026
- Fix fd leak when PENDING_TERMIOS_RESTORE mutex is poisoned after successful tcgetattr (finding #2) - Restore comment explaining intentional if guard in write_empty_password for release builds where debug_assert is stripped (finding #3) - Document that rpassword's internal fd leaks on longjmp as a known minor limitation (finding #1) - Note UTF-8 restriction from rpassword vs previous raw bytes (finding #4) Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.