-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle old versions of
/usr/bin/env
when loading shell env
This fixes #9786 by using an invocation of `/usr/bin/env` that's supported by macOS 12. As it turns out, on macOS 12 (and maybe 13?) `/usr/bin/env` doesn't support the `-0` flag. In our case it would silently fail, since we `exit 0` in our shell invocation and because the program we run and whose exit code we check is the `$SHELL` and not `/usr/bin/env`. What this change does is to drop the `-0` and instead split the environment on `\n`. This works even if an environment variable contains a newline character because that would then be escaped. Co-authored-by: Dave Smith <davesmithsemail@gmail.com>
- Loading branch information
1 parent
6c45bc2
commit dc98b3c
Showing
2 changed files
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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