outputs read message Could not find app path for 'unknown_package'.
check exit code echo $? is 0. That means the above red message is written to stdout instead of stderr.
Expected Behavior
The exit code should be 1 (as in pwsh, $LASTEXITCODE is 1)
Additional context/output
Scoop scripts uses abort "msg..." to write error output, but when I test it with a local .ps1 script, it reports
The term 'abort' is not recognized as a name of a cmdlet,
function, script file, or executable program. Check the
spelling of the name, or if a path was included, verify
that the path is correct and try again.
Possible Solution
use throw or Write-Error "msg..." with exit 1, or keep using abort "msg..." and then add exit 1 after it?
System details
Windows version: [e.g. 7, 8, 10, 11]
10
OS architecture: [e.g. 32bit, 64bit, arm64]
64bit
PowerShell version: [output of "$($PSVersionTable.PSVersion)"]
7.4.6
Additional software: [(optional) e.g. ConEmu, Git]
Git bash: downloaded by scoop install git, version git version 2.45.2.windows.1
Bug Report
Current Behavior
scoop prefix unknown_package
Could not find app path for 'unknown_package'.
echo $?
is 0. That means the above red message is written to stdout instead of stderr.Expected Behavior
The exit code should be 1 (as in pwsh,
$LASTEXITCODE
is 1)Additional context/output
Scoop scripts uses
abort "msg..."
to write error output, but when I test it with a local.ps1
script, it reportsPossible Solution
use
throw
orWrite-Error "msg..."
withexit 1
, or keep usingabort "msg..."
and then addexit 1
after it?System details
Windows version: [e.g. 7, 8, 10, 11] 10
OS architecture: [e.g. 32bit, 64bit, arm64] 64bit
PowerShell version: [output of
"$($PSVersionTable.PSVersion)"
] 7.4.6Additional software: [(optional) e.g. ConEmu, Git] Git bash: downloaded by
scoop install git
, versiongit version 2.45.2.windows.1
Scoop Configuration