Skip to content

Use t.Setenv instead of os.Setenv #1146

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

Closed
wants to merge 1 commit into from
Closed

Conversation

imjasonh
Copy link
Collaborator

T.Setenv was added in Go 1.17. Since os.Setenv has side effects, this removes the need for deferring os.Setenv(prev) -- or in our case, not resetting the env var.

More info: golang/go#41260

@imjasonh imjasonh requested a review from jonjohnsonjr October 13, 2021 14:18
@imjasonh
Copy link
Collaborator Author

Nevermind, let's just wait and do this later.

@imjasonh imjasonh closed this Oct 13, 2021
@timhaines
Copy link

@imjasonh why'd you decided not to do this yet?

@imjasonh
Copy link
Collaborator Author

@imjasonh why'd you decided not to do this yet?

We still run some tests on Go pre-1.17, and those failed to build with this change.

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.

2 participants