-
-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Describe the bug
The locations which are searched for config files don't match the documentation.
I printed what was actually being searched and I found:
$HOME/.config/daktilo.toml$HOME/.config/daktilo_lib/daktilo.toml$HOME/.config/daktilo_lib/config
Note daktilo_lib as opposed to daktilo.
Related code location:
daktilo/crates/daktilo_lib/src/config.rs
Lines 34 to 38 in 56ddad8
| vec![ | |
| config_dir.join(DEFAULT_CONFIG), | |
| config_dir.join(env!("CARGO_PKG_NAME")).join(DEFAULT_CONFIG), | |
| config_dir.join(env!("CARGO_PKG_NAME")).join("config"), | |
| ] |
Seems CARGO_PKG_NAME is evaluated as daktilo_lib. I think it's just a scoping/namespace issue. I don't know any rust though.
To reproduce
For instance, create a config file under $HOME/.config/daktilo/daktilo.toml and watch it not taking effect.
Expected behavior
I believe config files should be searched at the locations specified in the documentation.
Screenshots / Logs
Console lines when I've created a config file at $HOME/.config/datkilo/daktilo.toml:
INFO daktilo: Starting...
WARN daktilo: Using the default configuration (run with `--init` to save it to a file).
WARN daktilo: No preset specified, using the default preset.
Console lines when I've created a config file at $HOME/.config/datkilo_lib/daktilo.toml:
INFO daktilo: Starting...
WARN daktilo: No preset specified, using the default preset.
Software information
- Operating system: Linux 6.8.0-52-generic chore(deps): bump tracing from 0.1.39 to 0.1.40 #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
- Rust version: rustc 1.84.1
- Project version: 0.6.0
Additional context
N/A