Rollup merge of #83705 - jyn514:theme-error, r=GuillaumeGomez
Give a better error when --theme is not a CSS file Before: ``` error: invalid argument: "bacon.toml" ``` After: ``` error: invalid argument: "bacon.toml" | = help: arguments to --theme must be CSS files ``` cc https://github.com/rust-lang/rust/pull/83478
This commit is contained in:
commit
a766d63b2d
4 changed files with 11 additions and 3 deletions
|
@ -484,7 +484,9 @@ impl Options {
|
|||
return Err(1);
|
||||
}
|
||||
if theme_file.extension() != Some(OsStr::new("css")) {
|
||||
diag.struct_err(&format!("invalid argument: \"{}\"", theme_s)).emit();
|
||||
diag.struct_err(&format!("invalid argument: \"{}\"", theme_s))
|
||||
.help("arguments to --theme must have a .css extension")
|
||||
.emit();
|
||||
return Err(1);
|
||||
}
|
||||
let (success, ret) = theme::test_theme_against(&theme_file, &paths, &diag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue