File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,14 @@ function Get-PackagesToBuild() {
7777 $packages = Get-CargoPackages
7878 $outputPackageNames = Get-OutputPackageNames $packages
7979
80+ # Force array in instances of a single package name
81+ if ($outputPackageNames -isnot [array ]) {
82+ $outputPackageNames = @ ($outputPackageNames )
83+ }
84+
8085 [array ]$packagesToBuild = $packages | Where-Object { $outputPackageNames.Contains ($_.name ) }
8186
82- if ($Release ) {
87+ if ($Release ) {
8388 return $packagesToBuild
8489 }
8590
@@ -163,22 +168,22 @@ try {
163168
164169 Write-Host " Creating API review file"
165170 $apiReviewFile = Create- ApiViewFile $package
166-
171+
167172 Write-Host " Copying API review file to '$targetApiReviewFile '"
168173 Copy-Item - Path $apiReviewFile - Destination $targetApiReviewFile - Force
169174 }
170175 }
171176
172177 if ($OutBuildOrderFile ) {
173178 $buildOrder = @ ()
174- foreach ($line in $packResult ) {
179+ foreach ($line in $packResult ) {
175180 if ($line -match ' ^\s*Packaging (\w*) ([\w\d\.-]*)' ) {
176181 $buildOrder += $matches [1 ]
177182 }
178183 }
179184
180185 Write-Host " Build Order: $ ( $buildOrder -join ' , ' ) "
181- $buildOrder | ConvertTo-Json - Depth 100 | Set-Content $OutBuildOrderFile
186+ ConvertTo-Json $buildOrder - Depth 100 | Set-Content $OutBuildOrderFile
182187 }
183188}
184189finally {
You can’t perform that action at this time.
0 commit comments