Skip to content

Commit c38fc63

Browse files
committed
fix scoop-depends
1 parent 366f651 commit c38fc63

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

libexec/scoop-depends.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
. "$PSScriptRoot\..\lib\depends.ps1" # 'Get-Dependency'
66
. "$PSScriptRoot\..\lib\versions.ps1" # 'Select-CurrentVersion'
77
. "$PSScriptRoot\..\lib\manifest.ps1" # 'Get-Manifest' (indirectly)
8+
. "$PSScriptRoot\..\lib\download.ps1" # 'Get-UserAgent'
89

910
$opt, $apps, $err = getopt $args 'a:' 'arch='
1011
$app = $apps[0]
@@ -21,7 +22,14 @@ try {
2122
$deps = @()
2223
Get-Dependency $app $architecture | ForEach-Object {
2324
$dep = [ordered]@{}
24-
$dep.Source, $dep.Name = $_ -split '/'
25+
26+
$app, $null, $bucket, $url = Get-Manifest $_
27+
if (!$url) {
28+
$bucket, $app = $_ -split '/'
29+
}
30+
$dep.Source = if ($url) { $url } else { $bucket }
31+
$dep.Name = $app
32+
2533
$deps += [PSCustomObject]$dep
2634
}
2735
$deps

0 commit comments

Comments
 (0)