mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Improve messages and behavior when there's a problem in finding zip files (#15284)
This commit is contained in:
1 parent
b5e41e2587
commit
2f0cc3b0f8
1 file changed
+10
-2
@@ -76,8 +76,16 @@ jobs:
|
||||
displayName: Install packaging tools
|
||||
|
||||
- powershell: |
|
||||
$zipPath = Get-Item '$(System.ArtifactsDirectory)\Symbols\results\*$(PkgFilter).zip'
|
||||
Write-Verbose -Verbose "Zip Path: $zipPath"
|
||||
$zipPathString = '$(System.ArtifactsDirectory)\Symbols\results\*$(PkgFilter).zip'
|
||||
Write-Verbose -Verbose "Zip Path: $zipPathString"
|
||||
$zipPath = Get-Item $zipPathString
|
||||
if(@($zipPath).Count -eq 0) {
|
||||
throw "No files found at '$zipPathString'"
|
||||
}
|
||||
elseif(@($zipPath).Count -ne 1) {
|
||||
$names = $zipPath.Name -join "', '"
|
||||
throw "multiple files '${names}' found with '${zipPathString}'"
|
||||
}
|
||||
|
||||
$expandedFolder = $zipPath.BaseName
|
||||
Write-Host "sending.. vso[task.setvariable variable=SymbolsFolder]$expandedFolder"
|
||||
|
||||
Reference in new issue
Block a user