Stop preferring /opt/homebrew/bin/shadowenv#3957
Open
joshheinrichs-shopify wants to merge 1 commit intoShopify:mainfrom
Open
Stop preferring /opt/homebrew/bin/shadowenv#3957joshheinrichs-shopify wants to merge 1 commit intoShopify:mainfrom
joshheinrichs-shopify wants to merge 1 commit intoShopify:mainfrom
Conversation
We distribute shadowenv via Nix, but at least one person still has an old version installed on their machine via Homebrew. The version at the front of their $PATH and the one in Homebrew were far enough out of sync that they were incompatible. By just looking for shadowenv on $PATH we should be able to locate the correct version. It looks like this was added to help with cases where $PATH is broken[1]. We could keep something as a fallback, but at least at Shopify, /opt/homebrew/bin isn't a good fallback anymore. [1] b7dc6d2
Member
|
The main reason the fallback was added is because if you open VS Code from an icon (rather than from the terminal), it does not inherit the shell environment and then it cannot find executables like This was already an issue with the Homebrew version. Several developers open the editor from the icon and then then How can this problem be addressed in the Nix approach without blocking developers from opening their editors through the icon? |
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.
We distribute shadowenv via Nix, but at least one person still has an old version installed on their machine via Homebrew. The version at the front of their $PATH and the one in Homebrew were far enough out of sync that they were incompatible. By just looking for shadowenv on $PATH we should be able to locate the correct version.
It looks like this was added to help with cases where $PATH is broken[1]. We could keep something as a fallback, but at least at Shopify, /opt/homebrew/bin isn't a good fallback anymore.
[1] b7dc6d2