In version 2.x I can do:
- task: SonarCloudPrepare@2
inputs:
extraProperties: |
sonar.scanner.metadataFilePath=$(Agent.BuildDirectory)/.sonarqube/out/.sonar/report-task.txt
And in the logs it appears as (which is correct):
sonar.scanner.metadataFilePath=D:\\agent_01\\_work\\1/.sonarqube/out/.sonar/report-task.txt
But without touching the pipeline other than to change @2
to @3
it fails because it does not interpret the back slashes correctly and removes them:
sonar.scanner.metadataFilePath=D:agent_01_work1/.sonarqube/out/.sonar/report-task.txt