Skip to content

Commit dbade71

Browse files
committed
Fix syntax
1 parent 64413be commit dbade71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,17 @@ jobs:
290290
iwr -useb get.scoop.sh | iex
291291
292292
# ensure buckets and update
293-
scoop bucket add extras 2>$null || Write-Host "extras already present"
293+
if (-not (scoop bucket list | Select-String -Quiet '^extras$')) {
294+
scoop bucket add extras
295+
} else {
296+
Write-Host "extras already present"
297+
}
294298
scoop update
295299
296300
# install packages
297301
scoop install nsis 7zip
298302
299-
# ensure scoop shims are on PATH for subsequent steps in the same job
303+
# ensure scoop shims are on PATH for subsequent steps
300304
$scoopShims = Join-Path $env:USERPROFILE 'scoop\shims'
301305
if (Test-Path $scoopShims) {
302306
$env:PATH = "$scoopShims;$env:PATH"

0 commit comments

Comments
 (0)