-
Notifications
You must be signed in to change notification settings - Fork 126
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
Unquoted argument in dotnet-install.sh leads to build failure if the working directory path contains spaces #2435
Unquoted argument in dotnet-install.sh leads to build failure if the working directory path contains spaces #2435
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Failure to quote the argument leads to incorrect assignment of positional arguments if the working path contains spaces. fixes dotnet#2435
The dotnet-install script, as well as all files under eng/common are maintained in https://github.com/dotnet/arcade. IMO, this bug should be migrated to that repository. |
Triage: This should be reviewed in source-build to ensure that the version of this file is up to date with Arcade. |
[Triage] source-build is using the Arcade version of the script. If this is still an issue please follow @omajid's guideance. |
The
$dotnetRoot
argument being passed in line 78 should be quoted.source-build/eng/common/dotnet-install.sh
Line 78 in bf414f0
If the absolute path of the script contains spaces, it is being passed as multiple arguments. The values of the remaining arguments are populated with bogus values as a result.
Consequently, invocation of the
InstallDotNet
function in line 203 fails, despite the$root
argument being properly quoted there, as it already contains only the leading part of the path up to the first space and remaining arguments contain all sorts of nonsense.source-build/eng/common/tools.sh
Lines 191 to 203 in bf414f0
A snippet of an example output of
bash -x dotnet-install.sh -runtime dotnet -version 3.1.1
executed in~/dotnet script test/a/b/c/d
The text was updated successfully, but these errors were encountered: