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

Specify LastExit scope #7465

Merged
merged 3 commits into from
Jun 4, 2021
Merged

Specify LastExit scope #7465

merged 3 commits into from
Jun 4, 2021

Conversation

garath
Copy link
Member

@garath garath commented Jun 3, 2021

Specify global scope in prepping LastExit to avoid shadowing.

I confirmed the scope-change behavior work as expected locally, and verified that this change did not cause any SDL failures in SDK, runtime or aspnetcore repositories.

@garath garath self-assigned this Jun 3, 2021
@dagood
Copy link
Member

dagood commented Jun 3, 2021

There are a few more instances of this pattern:

$LASTEXITCODE = 0

https://github.com/dotnet/arcade/blob/main/Documentation/Policy/PowershellBestPractices.md#L104

Copy link
Member

@jonfortescue jonfortescue left a comment

Choose a reason for hiding this comment

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

I'd look at the stuff Davis mentioned but otherwise this seems good.

@garath
Copy link
Member Author

garath commented Jun 3, 2021

There are a few more instances of this pattern

Good catch, thank you.

Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

LGTM. I think it'd be good to update this too, for the future: https://github.com/dotnet/arcade/blob/main/Documentation/Policy/PowershellBestPractices.md

@garath garath merged commit 4a02fbe into dotnet:main Jun 4, 2021
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.

3 participants