Skip to content

Conversation

@tompng
Copy link
Member

@tompng tompng commented Jul 17, 2024

TestIRB::ConfigValidationTest#setup forgot to clear ENV['XDG_CONFIG_HOME']

With these environment variables, rake test fails.

echo "puts 'IRBRC'; exit" > /path/to/dummy_home/env_irbrc
echo "puts 'HOME'; exit" > /path/to/dummy_home/.irbrc
echo "puts 'XDG'; exit" > /path/to/dummy_home/.config/irb/irbrc
IRBRC=/path/to/dummy_home/env_irbrc HOME=/path/to/dummy_home/ XDG_CONFIG_HOME=/path/to/dummy_home/.config rake test

Test passes with normal irbrc content maybe with Error loading RC file warning message, but it's better not to read user-defined irbrc file.

@tompng tompng force-pushed the test_clear_xdg_env branch from 6113d5e to 90b4bfa Compare July 18, 2024 10:20
@tompng tompng merged commit 632da0f into ruby:master Jul 18, 2024
@tompng tompng deleted the test_clear_xdg_env branch July 18, 2024 10:56
matzbot pushed a commit to ruby/ruby that referenced this pull request Jul 18, 2024
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