Skip to content
New issue

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

Fix exit #1797

Merged
merged 11 commits into from
Dec 10, 2020
Merged

Fix exit #1797

merged 11 commits into from
Dec 10, 2020

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Dec 1, 2020

Fix #1795

@nohwnd nohwnd added this to the 5.1.1xx milestone Dec 1, 2020
@nohwnd nohwnd changed the base branch from v5.0 to rel/5.1.1xx December 1, 2020 17:34
@nohwnd nohwnd requested a review from fflaten December 1, 2020 17:51
@nohwnd
Copy link
Member Author

nohwnd commented Dec 1, 2020

/fyi @asears

Copy link
Collaborator

@fflaten fflaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No go unfortunately.
We should probably also add some tests for this as it's hard to remember all scenarios, 🙂

src/Pester.ps1 Outdated Show resolved Hide resolved
src/Pester.ps1 Outdated Show resolved Hide resolved
@nohwnd
Copy link
Member Author

nohwnd commented Dec 6, 2020

@fflaten should be better.

Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com>
Copy link
Collaborator

@fflaten fflaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nohwnd Looks good - just need to reduce the sample exitcode for Unix-compatibility

tst/Pester.RSpec.InNewProcess.ts.ps1 Outdated Show resolved Hide resolved
tst/Pester.RSpec.InNewProcess.ts.ps1 Outdated Show resolved Hide resolved
tst/Pester.RSpec.InNewProcess.ts.ps1 Outdated Show resolved Hide resolved
tst/Pester.RSpec.InNewProcess.ts.ps1 Outdated Show resolved Hide resolved
@fflaten
Copy link
Collaborator

fflaten commented Dec 6, 2020

Btw. when would you use [System.Environment]::ExitCode? Not a request to remove it, just never had a reason to use it yet.

nohwnd and others added 6 commits December 7, 2020 09:21
Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com>
Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com>
Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com>
Co-authored-by: Frode Flaten <3436158+fflaten@users.noreply.github.com>
@nohwnd
Copy link
Member Author

nohwnd commented Dec 10, 2020

IDK actually, I removed it to avoid code that is not needed. I could not come up with any way to make it propagate from powershell session into the calling process.

@nohwnd nohwnd merged commit d05b3cf into rel/5.1.1xx Dec 10, 2020
@nohwnd nohwnd deleted the fix-exit branch December 10, 2020 13:58
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.

New always Exit-behavior breaks scripts using Invoke-Pester
2 participants