Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Bug] `lib/install.ps1` function `New-DirectoryJunction` wrongfully adds error to `$Error`

Open o-l-a-v opened this issue 2 months ago • 1 comments

Bug Report

Current Behavior

Silently continue, which still adds error to $Error.

PS > scoop install extras/amber
PS > $Error

Get-Service: C:\Users\olavb\scoop\apps\scoop\current\lib\install.ps1:557
Line |
 557 |      if (Get-Service -Name cexecsvc -ErrorAction SilentlyContinue) {
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find any service with service name 'cexecsvc'.

PS >

Expected Behavior

Ignore instead of silently continue.

PS > scoop install extras/amber
PS > $Error
PS >

Additional context/output

Possible Solution

System details

Windows version: 11

OS architecture: x64

PowerShell version: v7.5.3 x64

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

o-l-a-v avatar Oct 13 '25 20:10 o-l-a-v

I think most uses of -ErrorAction SilentlyContinue in Scoop-Core should be replaced with -ErrorAction Ignore. We don't really need most of these error messages recorded in $Error. The same applies to all buckets. Is that so?

z-Fng avatar Nov 15 '25 15:11 z-Fng