Skip to content

Commit 376630f

Browse files
committed
Fix: first scoop update fails because scoop deletes itself too early (needs to call itself to get proxy config for git clone)
1 parent 2648684 commit 376630f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libexec/scoop-update.ps1

+6-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ function update_scoop() {
5151
scoop config SCOOP_BRANCH "$branch"
5252
}
5353

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

5756
# get git scoop
58-
git_clone -q $repo --branch $branch --single-branch $currentdir
57+
git_clone -q $repo --branch $branch --single-branch $newdir
58+
59+
# replace non-git scoop with the git version
60+
rm -r -force $currentdir -ea stop
61+
mv $newdir $currentdir
5962
}
6063
else {
6164
pushd $currentdir

0 commit comments

Comments
 (0)