Skip to content

Commit

Permalink
Fix: first scoop update fails because scoop deletes itself too early …
Browse files Browse the repository at this point in the history
…(needs to call itself to get proxy config for git clone)
  • Loading branch information
lukesampson committed May 31, 2016
1 parent 2648684 commit 376630f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libexec/scoop-update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ function update_scoop() {
scoop config SCOOP_BRANCH "$branch"
}

# remove non-git scoop
rm -r -force $currentdir -ea stop
$newdir = fullpath $(versiondir 'scoop' 'new')

# get git scoop
git_clone -q $repo --branch $branch --single-branch $currentdir
git_clone -q $repo --branch $branch --single-branch $newdir

# replace non-git scoop with the git version
rm -r -force $currentdir -ea stop
mv $newdir $currentdir
}
else {
pushd $currentdir
Expand Down

0 comments on commit 376630f

Please sign in to comment.