Skip to content

Make sure exit code is returned from .ps1 shim#3851

Closed
ocitrev wants to merge 9 commits intoScoopInstaller:masterfrom
ocitrev:shim-exitcode
Closed

Make sure exit code is returned from .ps1 shim#3851
ocitrev wants to merge 9 commits intoScoopInstaller:masterfrom
ocitrev:shim-exitcode

Conversation

@ocitrev
Copy link
Copy Markdown
Contributor

@ocitrev ocitrev commented Feb 14, 2020

This PR will fix issue #3850.
When a script returns a non zero value, the automatic variable $? is set to $false
Adding the line exit $LastExitCode will properly set the $? automatic variable when a .ps1 shim is executed.

Comment thread lib/core.ps1
@Ash258
Copy link
Copy Markdown
Contributor

Ash258 commented Feb 14, 2020

Rebase to develop

@ocitrev
Copy link
Copy Markdown
Contributor Author

ocitrev commented Feb 15, 2020

Rebased to develop

@rashil2000
Copy link
Copy Markdown
Member

Merged in develop branch - #4543

@rashil2000 rashil2000 closed this Dec 2, 2021
@ocitrev ocitrev deleted the shim-exitcode branch December 2, 2021 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants