Skip to content

Commit

Permalink
manifest: Fix first selected manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
HUMORCE committed Sep 24, 2024
1 parent a65c84a commit 61b3259
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions lib/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,16 @@ function Get-Manifest($app) {
if ($bucket) {
$manifest = manifest $app $bucket
} else {
$count = 0
foreach ($tekcub in Get-LocalBucket) {
$manifest = manifest $app $tekcub
if (!$manifest) {
$manifest = manifest $app $tekcub
}
if ($manifest) {
$bucket = $tekcub
break
if (!$bucket) {
$bucket = $tekcub
}
$count++
}
}
}
Expand All @@ -99,6 +104,13 @@ function Get-Manifest($app) {
}
}
}

if ($count) {
if ($count -gt 1) {
warn "Multiple buckets contain '$app', selected manifest are '$bucket/$app'."
}
}

return $app, $manifest, $bucket, $url
}

Expand Down

0 comments on commit 61b3259

Please sign in to comment.