Handle old versions of `/usr/bin/env` when loading shell env (#10202)
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. Release Notes: - Fixed Zed not picking up shell environments correctly when running on macOS 12. ([#9786](https://github.com/zed-industries/zed/issues/9786)). Co-authored-by: Dave Smith <davesmithsemail@gmail.com>
T
Thorsten Ball committed
b05aa381aa0f83c7f4809ca67b44568248626e55
Parent: ec6efe2
Committed by GitHub <noreply@github.com>
on 4/5/2024, 1:46:56 PM