Skip to content

Commit

Permalink
Move applist() from update/cleanup commad to core
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Aug 30, 2017
1 parent 8f1f7d9 commit 9b3e7c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 5 additions & 0 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ function reset_aliases() {
$default_aliases.keys | % { reset_alias $_ $default_aliases[$_] }
}

# convert list of apps to list of ($app, $global) tuples
function applist($apps, $global) {
return ,@($apps |% { ,@($_, $global) })
}

function app($app) {
$app = [string]$app
if($app -notmatch '^((ht)|f)tps?://') {
Expand Down
4 changes: 0 additions & 4 deletions libexec/scoop-cleanup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ function ensure_all_installed($apps, $global) {
}
}

# convert list of apps to list of ($app, $global) tuples
function applist($apps, $global) {
return , @($apps | % { , @($_, $global) })
}
if($apps) {
if ($apps -eq '*') {
$apps = applist (installed_apps $false) $false
Expand Down
5 changes: 0 additions & 5 deletions libexec/scoop-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ function ensure_all_installed($apps, $global) {
}
}

# convert list of apps to list of ($app, $global) tuples
function applist($apps, $global) {
return ,@($apps |% { ,@($_, $global) })
}

if(!$apps) {
if($global) {
"scoop update: --global is invalid when <app> is not specified."; exit 1
Expand Down

0 comments on commit 9b3e7c8

Please sign in to comment.