Skip to content

Commit 9aa48ff

Browse files
committed
Fix error handling in Install-IronPython.ps1
1 parent d670a31 commit 9aa48ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Src/Scripts/Install-IronPython.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ if (-not $ZipFile) {
6464
# Script run from within a checked out code base
6565
# Locate the zip archive in the standard location of the package target
6666
$projectRoot = $PSScriptRoot | Split-Path | Split-Path
67-
$ZipFile = @(Resolve-Path (Join-Path $projectRoot "Package/Release/Packages/IronPython-*/IronPython.3.*.zip"))
68-
if ($ZipFile.Count -gt 1) {
69-
Write-Error "Ambiguous implicit project zip file: $ZipFile"
70-
} elseif ($ZipFile.Count -lt 1) {
67+
$zipFiles = @(Resolve-Path (Join-Path $projectRoot "Package/Release/Packages/IronPython-*/IronPython.3.*.zip"))
68+
if ($zipFiles.Count -gt 1) {
69+
Write-Error (@("Ambiguous implicit project zip files:") + $zipFiles -join "`n")
70+
} elseif ($zipFiles.Count -lt 1) {
7171
Write-Error "Missing zip file. Have you run './make package'?"
7272
}
73+
$ZipFile = $zipFiles
7374
} else {
7475
Write-Error "Cannot locate implicit zip file. Provide path to the zip file using '-ZipFile <path>'."
7576
}

0 commit comments

Comments
 (0)