From 8f5e3aa92ff8b3656e81ad1542bcb3c27bc0ab1b Mon Sep 17 00:00:00 2001 From: Brett Hewitson Date: Fri, 23 Dec 2022 12:56:03 +1000 Subject: [PATCH] adding true checks to if conditions --- .azure/pipelines/azure-pipelines-clean-agent.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure/pipelines/azure-pipelines-clean-agent.yml b/.azure/pipelines/azure-pipelines-clean-agent.yml index 89873772..11f3a408 100644 --- a/.azure/pipelines/azure-pipelines-clean-agent.yml +++ b/.azure/pipelines/azure-pipelines-clean-agent.yml @@ -27,22 +27,22 @@ steps: inputs: targetType: inline script: | - if (${{parameters.CleanArtifactsFolder}} -and Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY) { + if (${{parameters.CleanArtifactsFolder}} -eq $true -and Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY) { Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_ARTIFACTSTAGINGDIRECTORY" Remove-Item -Path "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue } - if (${{parameters.CleanBinariesFolder}} -and Test-Path $env:BUILD_BINARIESDIRECTORY) { + if (${{parameters.CleanBinariesFolder}} -eq $true -and Test-Path $env:BUILD_BINARIESDIRECTORY) { Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_BINARIESDIRECTORY" Remove-Item -Path "$env:BUILD_BINARIESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue } - if (${{parameters.CleanSourcesFolder}} -and Test-Path $env:BUILD_SOURCESDIRECTORY) { + if (${{parameters.CleanSourcesFolder}} -eq $true -and Test-Path $env:BUILD_SOURCESDIRECTORY) { Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_SOURCESDIRECTORY" Remove-Item -Path "$env:BUILD_SOURCESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue } - if (${{parameters.CleanPublishFolder}} -and Test-Path $env:BUILD_PUBLISHDIRECTORY) { + if (${{parameters.CleanPublishFolder}} -eq $true -and Test-Path $env:BUILD_PUBLISHDIRECTORY) { Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_PUBLISHDIRECTORY" Remove-Item -Path "$env:BUILD_PUBLISHDIRECTORY" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue }