Skip to content

Commit fa7a2ed

Browse files
committed
fix shell escaping
1 parent 8f4124e commit fa7a2ed

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/sonarcube.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
DOTNET_CLI_TELEMETRY_OPTOUT: 1
2323
DOTNET_NOLOGO: true
2424
SOLUTION_FILE: 'src/Steeltoe.All.slnx'
25+
NUGET_VULNERABLE_PACKAGE_WARNINGS: '"NU1901;NU1902;NU1903;NU1904"'
2526
SONAR_TEST_ARGS: >-
2627
--no-build --configuration Release --collect "XPlat Code Coverage" --logger trx --results-directory ${{ github.workspace }}/TestOutput
2728
--settings coverlet.runsettings -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.UseSourceLink=false
@@ -75,13 +76,10 @@ jobs:
7576
/d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths=**/coverage.opencover.xml
7677
7778
- name: Restore packages
78-
shell: pwsh
79-
run: |
80-
$nuGetVulnerablePackageWarnings='NU1901;NU1902;NU1903;NU1904'
81-
dotnet restore ${{ env.SOLUTION_FILE }} /p:Configuration=Release /p:NuGetAuditLevel=low /p:WarningsNotAsErrors=`"$nuGetVulnerablePackageWarnings`" --verbosity minimal
79+
run: dotnet restore ${{ env.SOLUTION_FILE }} --verbosity minimal /p:Configuration=Release /p:NuGetAuditLevel=low /p:WarningsNotAsErrors='${{ env.NUGET_VULNERABLE_PACKAGE_WARNINGS }}'
8280

8381
- name: Build solution
84-
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal
82+
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release --verbosity minimal /p:NuGetAuditLevel=low /p:WarningsNotAsErrors='${{ env.NUGET_VULNERABLE_PACKAGE_WARNINGS }}'
8583

8684
- name: Test
8785
run: dotnet test ${{ env.SOLUTION_FILE }} --filter "Category!=MemoryDumps" ${{ env.SONAR_TEST_ARGS }}

0 commit comments

Comments
 (0)