Skip to content

Config defaults (algorithms, output) are parsed but never applied #17

@oritwoen

Description

@oritwoen

The config file supports a [defaults] section:

[defaults]
algorithms = ["sha256", "md5"]
output = "custom.parquet"

These values get parsed into DefaultsSection in config.rs, but build.rs never reads them. Clap's own defaults (sha256 and hashes.parquet) always win because the config isn't consulted for fallback values.

The priority chain documented in the README — "CLI flags > env vars > .shaha.toml > defaults" — doesn't actually work for algorithms and output. They're dead config fields.

Fix: BuildArgs should check config values when the user didn't explicitly pass -a or -o. Alternatively, if this section was always aspirational, remove it from the config struct to avoid confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions