From 295658c70e94677fcb9c90b2fe82c7267aaea298 Mon Sep 17 00:00:00 2001 From: "Georg Eckert (ZEISS)" <67101763+georg-eckert-zeiss@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:41:28 +0100 Subject: [PATCH] doc: Update 08-cli-tools.md with AddProcessAdditionalArguments updated according to API changes in 9.0.0 --- docs/03-common/08-cli-tools.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/03-common/08-cli-tools.md b/docs/03-common/08-cli-tools.md index e8842501e..5b73aee81 100644 --- a/docs/03-common/08-cli-tools.md +++ b/docs/03-common/08-cli-tools.md @@ -186,13 +186,20 @@ This example will always have 5 packages being pushed simultaneously. Possible e ### Custom Arguments -It may happen that certain arguments are not available from the fluent interface. In this case, the `SetProcessArgumentConfigurator` method can be used to add them manually: +It may happen that certain arguments are not available from the fluent interface. In this case, the `SetProcessAdditionalArguments` or `AddProcessAdditionalArguments` methods can be used to add them manually: ```csharp MSBuildTasks.MSBuild(_ => _ .SetTargetPath(SolutionFile) - .SetProcessArgumentConfigurator(_ => _ - .Add("/r"))); + .SetProcessAdditionalArguments( "/r" )); +``` + +If secrets are involved, add them with the `AddProcessRedactedSecrets` first: + +```csharp +SonarScannerTasks.SonarScannerBegin(_ => _ + .AddProcessRedactedSecrets( Secrets.SonarQubeAccessToken ) + .AddProcessAdditionalArguments( $"/d:sonar.login={Secrets.SonarQubeAccessToken}" )); ``` ### Exit Code Handling