1
1
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:
Rebecca Turner 2024-03-01 12:16:05 -08:00
parent 081a704a81
commit 96d47c8d8f
No known key found for this signature in database

View File

@ -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();