Skip to content

config.yaml silently ignored on macOS — ~/.config path is Linux-only #537

@RaeesBhatti

Description

@RaeesBhatti

Summary

On macOS, pup never reads ~/.config/pup/config.yaml even though the docs say it should. The config directory is resolved via dirs::config_dir() (src/config.rs:254), which returns ~/Library/Application Support on macOS, not ~/.config. The file at the documented path is silently ignored.

Repro

  1. On macOS, create ~/.config/pup/config.yaml with e.g. site: us5.datadoghq.com
  2. Run any pup command without DD_SITE set
  3. Observed: config file values are ignored; pup falls back to defaults
  4. Expected: values from the config file are applied

Root cause

  • config_dir() uses dirs::config_dir()~/Library/Application Support on macOS, ~/.config on Linux.
  • load_config_file() ends in serde_norway::from_str(&contents).ok()? (src/config.rs:273), so a missing or unparseable file returns None with no warning — making the misconfiguration invisible.

Proposed fixes

  1. Docs: Document the actual per-platform config path (~/Library/Application Support/pup/ on macOS), and/or mention PUP_CONFIG_DIR.
  2. Cross-platform consistency: Also check ~/.config/pup/ on macOS as a fallback so the documented path works.

Environment

  • macOS (Darwin 25.5.0)
  • pup main @ b09c5db

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions