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

Do not override @orig_env #7662

Merged
merged 1 commit into from
May 15, 2024
Merged

Do not override @orig_env #7662

merged 1 commit into from
May 15, 2024

Conversation

nobu
Copy link
Contributor

@nobu nobu commented May 15, 2024

What was the end-user or developer problem that led to this PR?

Since the merger of b545daa (ruby/ruby@6454238), TestFileExhaustive#test_expand_path_for_existent_username has been failing.

What is your fix for the problem, implemented in this PR?

Save to a local variable, instead of the instance variable used in teardown.
It is used only in with_env method, an instance variable has too wide scope.

Make sure the following tasks are checked

It is saved in `setup` and restored in `teardown`.
@nobu
Copy link
Contributor Author

nobu commented May 15, 2024

https://github.com/rubygems/rubygems/actions/runs/9082602807/job/24959357217#step:10:32

  Environment variable changed: TestGem#test_self_clear_paths : "GEM_PRIVATE_KEY_PASSPHRASE" added
  Environment variable changed: TestGem#test_self_clear_paths : "GEM_SPEC_CACHE" added
  Environment variable changed: TestGem#test_self_clear_paths : "HOME" changed : "/home/runner" -> "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-j581fc/userhome"
  Environment variable changed: TestGem#test_self_clear_paths : "RUBYGEMS_PREVENT_UPDATE_SUGGESTION" added

https://github.com/rubygems/rubygems/actions/runs/9082602807/job/24959357217#step:10:80

  Environment variable changed: TestCiDetector#test_ci_strings : "GEM_SPEC_CACHE" changed : "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-j581fc/spec_cache" -> "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-5g4w0l/spec_cache"
  Environment variable changed: TestCiDetector#test_ci_strings : "HOME" changed : "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-j581fc/userhome" -> "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-5g4w0l/userhome"
  Environment variable changed: TestCiDetector#test_ci? : "GEM_SPEC_CACHE" changed : "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-5g4w0l/spec_cache" -> "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-odx44d/spec_cache"
  Environment variable changed: TestCiDetector#test_ci? : "HOME" changed : "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-5g4w0l/userhome" -> "/tmp/rubytest.3fwilm/test_rubygems_20240514-14918-odx44d/userhome"

@hsbt hsbt enabled auto-merge May 15, 2024 08:06
@hsbt hsbt merged commit b1e483c into rubygems:master May 15, 2024
75 checks passed
@deivid-rodriguez
Copy link
Member

Thank you @nobu 🙏

deivid-rodriguez pushed a commit that referenced this pull request May 16, 2024
Do not override `@orig_env`

(cherry picked from commit b1e483c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants