Skip to content

Commit

Permalink
refactor(install): rename locate() to Find-Manifest()
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Apr 22, 2019
1 parent 2d61aee commit 9eed3d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/buckets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function rm_bucket($name) {
}

function new_issue_msg($app, $bucket, $title, $body) {
$app, $manifest, $bucket, $url = locate $app $bucket
$app, $manifest, $bucket, $url = Find-Manifest $app $bucket
$url = known_bucket_repo $bucket
$bucket_path = "$bucketsdir\$bucket"

Expand Down
2 changes: 1 addition & 1 deletion lib/depends.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function deps($app, $arch) {
function dep_resolve($app, $arch, $resolved, $unresolved) {
$app, $bucket, $null = parse_app $app
$unresolved += $app
$null, $manifest, $null, $null = locate $app $bucket
$null, $manifest, $null, $null = Find-Manifest $app $bucket

if(!$manifest) {
if(((Get-LocalBucket) -notcontains $bucket) -and $bucket) {
Expand Down
7 changes: 6 additions & 1 deletion lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function nightly_version($date, $quiet = $false) {

function install_app($app, $architecture, $global, $suggested, $use_cache = $true, $check_hash = $true) {
$app, $bucket, $null = parse_app $app
$app, $manifest, $bucket, $url = locate $app $bucket
$app, $manifest, $bucket, $url = Find-Manifest $app $bucket

if(!$manifest) {
abort "Couldn't find manifest for '$app'$(if($url) { " at the URL $url" })."
Expand Down Expand Up @@ -73,6 +73,11 @@ function install_app($app, $architecture, $global, $suggested, $use_cache = $tru
}

function locate($app, $bucket) {
Show-DeprecatedWarning $MyInvocation 'Find-Manifest'
return Find-Manifest $app $bucket
}

function Find-Manifest($app, $bucket) {
$manifest, $url = $null, $null

# check if app is a URL or UNC path
Expand Down
2 changes: 1 addition & 1 deletion lib/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function supports_architecture($manifest, $architecture) {
}

function generate_user_manifest($app, $bucket, $version) {
$null, $manifest, $bucket, $null = locate $app $bucket
$null, $manifest, $bucket, $null = Find-Manifest $app $bucket
if ("$($manifest.version)" -eq "$version") {
return manifest_path $app $bucket
}
Expand Down

1 comment on commit 9eed3d8

@MCOfficer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that did indeed fix my issue, thanks.

Please sign in to comment.