Skip to content

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

@o-l-a-v

Description

@o-l-a-v

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions