Skip to content

Commit

Permalink
Fix 61b3259
Browse files Browse the repository at this point in the history
  • Loading branch information
HUMORCE committed Sep 26, 2024
1 parent 8f18406 commit c5c82cd
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions lib/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,15 @@ function Get-Manifest($app) {
if ($bucket) {
$manifest = manifest $app $bucket
} else {
$count = 0
$matched_buckets = @()
foreach ($tekcub in Get-LocalBucket) {
if (!$manifest) {
$manifest = manifest $app $tekcub
$current_manifest = manifest $app $tekcub
if (!$manifest -and $current_manifest) {
$manifest = $current_manifest
$bucket = $tekcub
}
if ($manifest) {
if (!$bucket) {
$bucket = $tekcub
}
$count++
if ($current_manifest) {
$matched_buckets += $tekcub
}
}
}
Expand All @@ -105,10 +104,8 @@ function Get-Manifest($app) {
}
}

if ($count) {
if ($count -gt 1) {
warn "Multiple buckets contain manifest '$app', the current selection is '$bucket/$app'."
}
if ($matched_buckets -gt 1) {
warn "Multiple buckets contain manifest '$app', the current selection is '$bucket/$app'."
}

return $app, $manifest, $bucket, $url
Expand Down

0 comments on commit c5c82cd

Please sign in to comment.