-
Notifications
You must be signed in to change notification settings - Fork 353
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_INSTALL_DIR is corrupted if there are multiple dotnet CLI installs on the path #1251
Comments
That code is a bit odd. Why is it not just |
@anurse - thoughts on @alexperovich comment? |
Sounds fine to me. I just want the script to find dotnet even when I have multiple on the PATH :) |
The solution to #1253 likely makes this better. |
analogrelay
added a commit
to aspnet/AspLabs
that referenced
this issue
Nov 26, 2018
Ping @chcosta @natemcmaster |
I'll have a fix soon. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the user has multiple dotnet CLIs on their path, the DOTNET_INSTALL_DIR value gets corrupted because this code doesn't properly select the first result:
https://github.com/dotnet/arcade-minimalci-sample/blob/a249ce8e79a9b71d5367d7bc59132121a7490d5b/eng/common/tools.ps1#L36-L38
On my machine, where the PATH search yields multiple results, DOTNET_INSTALL_DIR ends up being set to multiple directories:
This causes the search for the correct SDK version to fail, and Arcade changes to use a repo-local
.dotnet
directory, which is definitely not what I wanted :).A simple patch to add
| select -first 1
on the end fixes this for PowerShell. Haven't checked if this occurs in Bash as well.The text was updated successfully, but these errors were encountered: