Repository navigation
fix(fspy): bundle an Oils master build with four osh fixes - #939
Merged
Merged
Conversation
On macOS, fspy runs tracked `/bin/sh` and `/bin/bash` commands under the bundled Oils shell. Oils 0.38.0 differs from the real shells in four cases that change task results: errexit after a compound command with a redirect, `$?` in the EXIT trap, a bare `exit` in the EXIT trap, and `$BASH`. The fixes are in Oils master but not in a release, so this pins the wan9chi/oils-for-unix-build release for master commit d114978c. The new shell_semantics tests run each case under a tracked shell. They fail with 0.38.0 and pass with this build on macOS, and they pass with the real shells on Linux.
# Conflicts: # CHANGELOG.md
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.
Motivation
On macOS, fspy runs tracked
/bin/shand/bin/bashcommands under the bundled Oils shell, while Linux runs the real shells. Oils 0.38.0 differs in four cases that change task results:while readloop with a redirect underset -eexits the script when the loop ends, so the task fails on macOS only ([osh/cmd_eval] Don't check errexit on a compound command's status after a redirect oils-for-unix/oils#2695).$?and exits with it, or calls a bareexit, exits 0 after a failure, so a failed task is reported as successful ([osh] Set $? to the exit status before running the EXIT trap oils-for-unix/oils#2693, [osh] Bare exit in the EXIT trap uses the status from before the trap oils-for-unix/oils#2694).$BASHis empty when the command runs asbash([osh] Set $BASH when argv[0] is bash oils-for-unix/oils#2692).These fixes are in Oils master but not in a release. wan9chi/oils-for-unix-build#1 lets that repo build from a master commit, and this pins its release for master
d114978c. Both assets have build provenance from that repo's release workflow.Each case comes with spec tests in Oils, which its CI runs on every commit. I also ran the cases from those PRs under a tracked shell on macOS: they fail with 0.38.0 and pass with this build.