Skip to content
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

DotNetToolRunner doesn't support empty space at tool path #4286

Open
2 tasks done
HeikeHofmann opened this issue Jan 3, 2024 · 0 comments
Open
2 tasks done

DotNetToolRunner doesn't support empty space at tool path #4286

HeikeHofmann opened this issue Jan 3, 2024 · 0 comments

Comments

@HeikeHofmann
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool

Cake version

4.0.0

Operating system

Windows

Operating system architecture

64-Bit

CI Server

Azure DevOps

What are you seeing?

we want to use Cake.Sonar in the own project, where the SonarScanner DotNet Tool is used.
The execution can be found here:
https://github.com/cake-contrib/Cake.Sonar/blob/f1062a4ceeeeaf58bf662af6b6b478ed2d50119a/src/Cake.Sonar/SonarRunner.cs#L56C23-L56C23

But we have now an empty Space in the path and the execution will fail, because the execution will not append with Quotation Markes.
Here is the issue in the Cake.Tool code:

builder.Append(command);

line 63 of https://github.com/cake-build/cake/blob/main/src/Cake.Common/Tools/DotNet/Tool/DotNetToolRunner.cs

This is the error then:
image

What is expected?

The code should be:

builder.AppendQuoted(command);

Steps to Reproduce

Add Cake.Sonar and use the Plugin.

Any other dotnet tool and empty space should also be failing with Windows Environment.

Output log

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant