Skip to content

Commit

Permalink
Handle empty yaml variable in interpolated string (#48494)
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr authored Mar 3, 2025
1 parent 7a677b5 commit 86f4594
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ jobs:
displayName: "Build and Package for PR"
- ${{ else }}:
- pwsh: |
if (Test-Path "$(ProjectListOverrideFile)") {
Write-Host "Clearing $(ProjectListOverrideFile)"
rm "$(ProjectListOverrideFile)"
Write-Host "##vso[task.setvariable variable=ProjectListOverrideFile;]"
$variableSet = $env:ProjectListOverrideFile -ne "`$`(ProjectListOverrideFile`)"
if ($variableSet -and (Test-Path $env:ProjectListOverrideFile)) {
Write-Host "Clearing $env:ProjectListOverrideFile"
rm $env:ProjectListOverrideFile
}
Write-Host '##vso[task.setvariable variable=ProjectListOverrideFile;]'
env:
ProjectListOverrideFile: $(ProjectListOverrideFile)
displayName: Cleanup Props File
- script: >-
Expand Down

0 comments on commit 86f4594

Please sign in to comment.