Skip to content

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
Contributor

@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.

@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