Saturate exit codes to 255 for all builtins#7702
Closed
ethulhu wants to merge 1 commit intofish-shell:masterfrom
Closed
Saturate exit codes to 255 for all builtins#7702ethulhu wants to merge 1 commit intofish-shell:masterfrom
ethulhu wants to merge 1 commit intofish-shell:masterfrom
Conversation
3 tasks
krobelus
reviewed
Feb 9, 2021
51e4490 to
69c9f76
Compare
zanchey
reviewed
Feb 10, 2021
69c9f76 to
8e13c83
Compare
After commit 6dd6a57, 3 remaining builtins were affected by uint8_t overflow: `exit`, `return`, and `functions --query`. This commit: - Moves the overflow check from `builtin_set_query` to `builtin_run`. - Removes a conflicting int -> uint8_t conversion in `builtin_return`. - Adds tests for the 3 remaining affected builtins. - Simplifies the wording for the documentation for `set --query`. - Does not change documentation for `functions --query`, because it does not state the exit code in its API. - Updates the CHANGELOG to reflect the change to all builtins.
8e13c83 to
1a8d282
Compare
Contributor
|
Great job, thanks! - merged as 5a0aa78 |
xdelaruelle
added a commit
to xdelaruelle/modules
that referenced
this pull request
Apr 5, 2021
Update fish install tests following change introduced on fish 3.2, where the exit code now saturates to 255 for all builtins commands rather overflowing. (see fish-shell/fish-shell#7702)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
After commit 6dd6a57, 3 remaining builtins were still affected by
uint8_toverflow:exit,return, andfunctions --query.This PR:
builtin_set_querytobuiltin_run.int→uint8_tconversion inbuiltin_return.exitandreturn.functions --query, because it does not state the exit code in its API.This PR is a generic solution to overflowing exit codes, following discussion on PR #7698.
TODOs: