manifest: Fix first selected manifest

This commit is contained in:
HUMORCE
2024-09-24 10:42:31 +00:00
parent a65c84a82a
commit 61b325986e

View File

@@ -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++
}
}
}
@@ -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
}