Skip to content

Ignore empty or relative XDG_CONFIG_HOME values - #90

Open
OskarEichler wants to merge 2 commits into
rdp:masterfrom
OskarEichler:codex/validate-xdg-config-home
Open

OskarEichler wants to merge 2 commits into
rdp:masterfrom
OskarEichler:codex/validate-xdg-config-home

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

XDG_CONFIG_HOME='' currently produces /app, and relative settings produce relative application paths. Ignore empty and relative values and use the existing HOME/.config fallback.

Reproduction and verification

Checked unset/empty/dot/relative/tilde settings, absolute root, spaces and Unicode paths. The XDG Base Directory Specification requires absolute paths and defines the empty/unset fallback.

  • External focused repro corpus: 9 checks pass against this isolated branch, under rbenv Ruby 4.0.6.
  • Existing upstream suite: 36 examples, zero failures before and after the patch (RBENV_VERSION=4.0.6 rbenv exec rspec -Ilib -Ispec).
  • Source-only change; no existing tests modified or new test files added, per the contributor's task constraint. The focused corpus lives outside the repository.
  • Local verification was on macOS. Other Ruby versions and native operating systems were not executed. Upstream RuboCop configuration cannot load its legacy rubocop-lts1_8.yml, including after installing current rubocop-lts; lint status is not represented as passing.

Breaking-change notes

No API removal. Invalid environment settings now fall back to HOME/.config; valid absolute paths and existing Windows/macOS branches retain their behavior.

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.

1 participant