mirror of
https://github.com/oxalica/nil.git
synced 2024-09-11 10:36:04 +03:00
Error if no files are given
This commit is contained in:
parent
081a704a81
commit
96d47c8d8f
@ -1,3 +1,4 @@
|
||||
use anyhow::anyhow;
|
||||
use anyhow::{Context, Result};
|
||||
use argh::FromArgs;
|
||||
use codespan_reporting::diagnostic::Severity;
|
||||
@ -138,7 +139,7 @@ fn main_diagnostics(args: DiagnosticsArgs) {
|
||||
fn diagnostics_for_files(paths: Vec<PathBuf>) -> Result<Option<ide::Severity>> {
|
||||
use codespan_reporting::term::termcolor::{ColorChoice, StandardStream};
|
||||
if paths.is_empty() {
|
||||
unreachable!();
|
||||
return Err(anyhow!("No files given"));
|
||||
}
|
||||
|
||||
let mut sources = Vec::new();
|
||||
|
Loading…
Reference in New Issue
Block a user