Skip to content

Conversation

@baronfel
Copy link
Member

@baronfel baronfel commented Aug 16, 2022

Description

Quotes file paths passed to the BrotliCompress tool as command line arguments so that the generated response file has the expected format for paths that include spaces.

Closes #26026

Customer Impact

Customers with Blazor WebAssembly projects that have a space in the path to the project could not publish their projects at all. They had to change the folder structure to no longer include a space to make publishing work again.

Regression
Yes, this regressed in 6.0.301 due to a change in System.CommandLine response file parsing. We fixed this for the CLI overall in an earlier fix, but missed this tool due to lack of test coverage for this particular scenario, as well as these standalone tools not using the same CLI processing logic as the 'core' dotnet tool (for good reason, since tools like the brotli compress tool are internal-only and should be free to change). This is present in 6.0.400 and onwards as well.

Risk

Low - the change only impacts file paths that are not already quoted and uses an existing mechanism for quoting. Automated tests have also been added to cover building/publishing in paths that contain a space.

@ghost ghost added the Area-Infrastructure label Aug 16, 2022
@baronfel baronfel force-pushed the quote-file-paths-in-brotli-task branch from 5781046 to bc2203b Compare August 18, 2022 12:19
@baronfel
Copy link
Member Author

I should use this test as a base to make sure that that we can exercise these code paths. We should duplicate this with a space-ified project path to ensure coverage.

@baronfel baronfel marked this pull request as ready for review August 18, 2022 19:27
@baronfel baronfel changed the title Quote file paths for the Blazor and Razor task tools Quote file paths for the BrotliCompress tool Aug 18, 2022
@baronfel
Copy link
Member Author

Having a hard time verifying that the test I added actually results in a test asset with a space in it. VS doesn't like me at the moment to debug.

Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@rbhanda
Copy link
Contributor

rbhanda commented Sep 1, 2022

Approved for 6.0.4xx as well

@baronfel
Copy link
Member Author

baronfel commented Sep 8, 2022

Branding PR has merged bumping to 6.0.305, so merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants