-
Notifications
You must be signed in to change notification settings - Fork 331
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
Fix quoting in MSBuild function in tools.sh #14759
Conversation
Without this, any arguments that need proper quoting (eg, an argument contains spaces) get mangled. I can reproduce the issue via the VMR by using something like: $ ./build.sh "/p:OfficialBuilder=foo bar" This builds on top of dotnet/installer#19686, which fixed quoting in build.sh.
This isn't an exhaustive fix, just the minimal to get the VMR to build with a space-containing property. I ran ShellCheck and it flags several other places where we mix arrays and strings and expand arrays incorrectly:
This warning is also concerning, since it flags a variable used in the inner build command for the VMR:
Although the VMR builds fine in source-build without any other changes. |
LGTM but I am no longer on .NET, sadly :( |
Over at runtime, we support it like this: https://github.com/dotnet/runtime/blob/13d753ce9faa06e7fa77c070b580948759b6bc0e/eng/build.sh#L565-L568. It was done so other usages of this file (namely; almost the entire dotnet org repos) are not affected. |
@am11 do you know of any places where fixing it like this would cause issues? |
I can't say for sure but one way to find out; do it in YOLO mode, fingers crossed 🤞 😅. It was just a caution we took when allowing runtime/build.sh --cmakeargs etc. to have spaces / semicolons in value. |
Ok, let's find out then 😄 |
The only thing it "broke" which needed reacting so far was this code in aspnetcore which passed |
Without this, any arguments that need proper quoting (eg, an argument contains spaces) get mangled.
I can reproduce the issue via the VMR by using something like:
This builds on top of dotnet/installer#19686, which fixed quoting in build.sh.