Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should report error when config.toml is invalid #2354

Open
TennyZhuang opened this issue Jun 6, 2024 · 1 comment
Open

Should report error when config.toml is invalid #2354

TennyZhuang opened this issue Jun 6, 2024 · 1 comment

Comments

@TennyZhuang
Copy link
Contributor

Describe the bug
config.toml parsing error is ignored even without a log.

The error produced here, without log

let cfg_path = crate::path::config_file();
let mut cfg: Self = serdeconv::from_toml_file(cfg_path.as_path()).context(format!(
"Config file '{}' is missing or not valid",
cfg_path.display()
))?;

And ignored here

let config = Config::load().unwrap_or_default();

When user provides an invalid config.toml (This is likely due to extreme lack of doc about the file), they can only see a default configuration applied without any information provided.

Information about your version

main

Information about your GPU
Please provide output of nvidia-smi

Additional context
Add any other context about the problem here.

@wsxiaoys
Copy link
Member

wsxiaoys commented Jun 6, 2024

Thanks for sharing the feedback, dup #2228

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

No branches or pull requests

2 participants