Skip to content

Commit

Permalink
udpate: don't call scoop, but use get(set)_config functions
Browse files Browse the repository at this point in the history
calling scoop could result into 'scoop is not recognized as command...'
  • Loading branch information
Ash258 committed Feb 1, 2019
1 parent 7d7facd commit ec524cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libexec/scoop-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ $quiet = $opt.q -or $opt.quiet
$independent = $opt.i -or $opt.independent

# load config
$repo = $(scoop config SCOOP_REPO)
$repo = $(get_config SCOOP_REPO)
if(!$repo) {
$repo = "https://github.com/lukesampson/scoop"
scoop config SCOOP_REPO "$repo"
set_config SCOOP_REPO "$repo"
}

$branch = $(scoop config SCOOP_BRANCH)
$branch = $(get_config SCOOP_BRANCH)
if(!$branch) {
$branch = "master"
scoop config SCOOP_BRANCH "$branch"
set_config SCOOP_BRANCH "$branch"
}

function update_scoop() {
Expand Down Expand Up @@ -80,7 +80,7 @@ function update_scoop() {
Push-Location $currentdir

# Check if user configured other branch
$branch = $(scoop config SCOOP_BRANCH)
$branch = $(get_config SCOOP_BRANCH)
if ((git_branch) -notlike "*$branch") { git_checkout $branch }

git_pull -q
Expand Down

0 comments on commit ec524cf

Please sign in to comment.