From ab1b51ee8a0103ad36298c3919ac86ab34f78504 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 11 Nov 2020 11:36:10 -0800 Subject: [PATCH] Create destination directory if it doesn't exist --- EsrpSign.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EsrpSign.yml b/EsrpSign.yml index 5820f62..5561958 100644 --- a/EsrpSign.yml +++ b/EsrpSign.yml @@ -62,6 +62,11 @@ steps: - pwsh: | Write-Verbose "BUILD_OUTPUT_PATH- ${{ parameters.buildOutputPath }}" -Verbose Write-Verbose "SIGNED_OUTPUT_PATH- ${{ parameters.signOutputPath }}" -Verbose + if(!(Test-Path '${{ parameters.signOutputPath }}')) + { + Write-Verbose "Creating SIGNED_OUTPUT_PATH- ${{ parameters.signOutputPath }}" -Verbose + $null = New-Item -Path '${{ parameters.signOutputPath }}' -ItemType Directory -force + } $file = Get-ChildItem -Path "${{ parameters.buildOutputPath }}\codesignsummary-*.md" -File $fileName = $file.Name Move-Item -Path "${{ parameters.buildOutputPath }}\$fileName" -Dest "$(Agent.TempDirectory)\$fileName"