Skip to content

Honor XDG_CONFIG_HOME for config discovery - #584

Open
ychampion wants to merge 1 commit into
bootandy:masterfrom
ychampion:fix/xdg-config-home
Open

Honor XDG_CONFIG_HOME for config discovery#584
ychampion wants to merge 1 commit into
bootandy:masterfrom
ychampion:fix/xdg-config-home

Conversation

@ychampion

Copy link
Copy Markdown

Summary

  • resolve the default config directory from XDG_CONFIG_HOME when it is an absolute path
  • retain ~/.dust.toml and ~/.config/dust/config.toml compatibility
  • cover custom and fallback config locations with a unit test

Why

Dust currently ignores $XDG_CONFIG_HOME, so users with a custom XDG config directory must pass --config on every invocation.

Closes #577

Validation

  • cargo test --bin dust
  • cargo test --test test_flags
  • cargo test --test tests_symlinks
  • cargo test --test test_exact_output -- --skip test_permission_normal --skip test_permission_flag
  • cargo fmt --check
  • live CLI smoke with an XDG config enabling JSON output

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.

Honor XDG_CONFIG_HOME for config discovery

1 participant