Skip to content

Commit 7a39d6d

Browse files
committed
Print a proper error message if the input file does not exist
1 parent 3003f64 commit 7a39d6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

av1an-cli/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ pub fn parse_cli(args: CliOpts) -> anyhow::Result<Vec<EncodeArgs>> {
541541
let mut valid_args: Vec<EncodeArgs> = Vec::with_capacity(inputs.len());
542542

543543
for input in inputs {
544+
ensure!(input.exists(), "Input file {:?} does not exist. Please ensure you typed it properly and it has not been moved.", input);
545+
544546
let temp = if let Some(path) = args.temp.as_ref() {
545547
path.to_str().unwrap().to_owned()
546548
} else {

0 commit comments

Comments
 (0)