Skip to content

--config pointing at a missing file is silently ignored since v0.8.3 #168

Closed

Description

@barnumbirr

Since v0.8.3, bluetui --config <path> with a path that does not exist starts on the default configuration instead of reporting it, so a typo in the path goes unnoticed.

v0.8.2 refused it:

$ bluetui -c /tmp/absent.toml
Config file not found

v0.8.3 starts normally with the defaults.

The check went away in the CLI rewrite in 6e71e2c (#158). main.rs used to do

if config_path.exists() {
    config_path.clone()
} else {
    eprintln!("Config file not found");
    exit(1);
}

and now passes the path straight to Config::new, which reads an unreadable file as an empty string (std::fs::read_to_string(conf_path).unwrap_or_default()) and so gets every default. That fallback is right for the implicit ~/.config/bluetui/config.toml; for a path given explicitly, an error as in v0.8.2 seems more useful.

Activity

  1. pythops commented on Nov 23, 2026

    @pythops
    Owner

    Good catch, I will push the fix today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions