-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet-sdk installs bogus ~/.dotnet/tools
entry as /etc/paths.d/dotnet-cli-tools
#22214
Comments
@marcpopMSFT this issue is about the casked brew installer, ie the brew installer does whatever the MS pkg installer does. This issue belongs in dotnet/installer I believe. (The non-cask brew installer is the source-built one.) |
@dleeapho are you saying that this would repro with our MS pkg as well? I know nothing about casked brew. |
Brew just downloads a package from here and asks the installer to run it. https://github.com/Homebrew/homebrew-cask/blob/master/Casks/dotnet-sdk.rb#L5 |
I think trying to repro with the MS pkg would be a good start. I'm no expert on Casks either so I cannot discount Cask interaction though my understanding is as @jsoref stated. |
@marcpopMSFT I am able to reproduce this issue on a vanilla macOS 12 and vs for mac 2019 8.10.13.2 pkg installer (no brew cask involved) directly from https://visualstudio.microsoft.com/vs/mac/ The installer is adding All the following issues are related to the I don't fully know what the right solution here is but this is leading to a poor developer experience because every new developer trying to install critical tools like (dotnet-ef, dotnet-format, etc) will have to do an unnecessary manual workaround that the pkg installer should have done in the first place. |
I'd half argue in favor of adding a |
I have reproduced the issue with the Microsoft installer package from https://dotnet.microsoft.com/en-us/download. |
Please, add env variable to define path to tools! |
We installed dotnet-sdk using brew today and the
/etc/paths.d/dotnet-cli-tools
it created injected a bogus~
into the systemPATH
variable which results inkubectl
getting upset.The
/etc/paths.d
directory (managed by/usr/libexec/path_helper
) takes static files and literally inlines their contents into a produced PATH env string.This PATH env string is not later evaluated, which means that a
~
in a file in/etc/paths.d
, as in:/etc/paths.d/dotnet-cli-tools
:Will not get converted into the equivalent of
$HOME/.dot/tools
.This gets reported by victims in issues such as kubernetes/kubectl#574.
I think that this is caused by:
sdk/src/Cli/dotnet/ShellShim/OsxBashEnvironmentPath.cs
Lines 23 to 78 in a30e465
Homebrew/homebrew-cask#112988
The text was updated successfully, but these errors were encountered: