Skip to content

Commit 23a63d8

Browse files
authored
fix: Don't update Scoop if not needed (#30)
1 parent f0cb83a commit 23a63d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Scoop.psm1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ function Install-Scoop {
1212
if ($env:SCOOP_REPO) {
1313
Write-Log "Switching to repository: ${env:SCOOP_REPO}"
1414
scoop config scoop_repo $env:SCOOP_REPO
15+
$needUpdate = $true
1516
}
1617
if ($env:SCOOP_BRANCH) {
1718
Write-Log "Switching to branch: ${env:SCOOP_BRANCH}"
1819
scoop config scoop_branch $env:SCOOP_BRANCH
20+
$needUpdate = $true
21+
}
22+
if ($needUpdate) {
23+
scoop update
1924
}
20-
scoop update
2125
}
2226

2327
Export-ModuleMember -Function Install-Scoop

0 commit comments

Comments
 (0)