Skip to content

Commit f8c0ca7

Browse files
Ardelean-Calinr15ch13
authored andcommitted
Removed the bucket from the app name when checking directories. (#2435)
* Removed the bucket from the app name when checking directories. * Smarter solution suggested by the review.
1 parent f5f7a71 commit f8c0ca7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/core.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ function cache_path($app, $version, $url) { "$cachedir\$app#$version#$($url -rep
8383
function sanitary_path($path) { return [regex]::replace($path, "[/\\?:*<>|]", "") }
8484
function installed($app, $global=$null) {
8585
if($null -eq $global) { return (installed $app $true) -or (installed $app $false) }
86+
# Dependencies of the format "bucket/dependency" install in a directory of form
87+
# "dependency". So we need to extract the bucket from the name and only give the app
88+
# name to is_directory
89+
$app = $app.split("/")[-1]
8690
return is_directory (appdir $app $global)
8791
}
8892
function installed_apps($global) {
@@ -114,7 +118,10 @@ function app_status($app, $global) {
114118
}
115119

116120
$status.missing_deps = @()
117-
$deps = @(runtime_deps $manifest) | Where-Object { !(installed $_) }
121+
$deps = @(runtime_deps $manifest) | Where-Object {
122+
$app, $bucket, $null = parse_app $_
123+
return !(installed $app)
124+
}
118125
if($deps) {
119126
$status.missing_deps += ,$deps
120127
}

0 commit comments

Comments
 (0)