We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With PowerShell 7 you can use chain operators. Without a proper value in $? it does not work as expected.
$?
When I run this command line:
PS> should-fail || echo "Failed"
I get no output. With current shims, PowerShell always see success (with automatic variable $?) when running .ps1 shims.
As a workaround, I can add .exe to the name of the command. This will bypass the .ps1 shim and work as expected.
PS> should-fail.exe || echo "Failed" Failed
The text was updated successfully, but these errors were encountered:
In case any one wants to try should-fail.exe, here is the source code.
int main() { return 1; }
Sorry, something went wrong.
fix(shims): Always exit $LASTEXITCODE from ps1 shim
b0e89ea
ScoopInstaller#3890 ![A](https://i.imgur.com/K9uAZXm.png)
Merged in develop branch - #4543
No branches or pull requests
With PowerShell 7 you can use chain operators. Without a proper value in
$?
it does not work as expected.When I run this command line:
I get no output.
With current shims, PowerShell always see success (with automatic variable
$?
) when running .ps1 shims.As a workaround, I can add .exe to the name of the command. This will bypass the .ps1 shim and work as expected.
The text was updated successfully, but these errors were encountered: