From fea8ebc73af4fa2b7f849f9b59316499fa412314 Mon Sep 17 00:00:00 2001 From: Bauke Date: Tue, 7 Nov 2023 17:19:19 +0100 Subject: [PATCH] Make file exists check if it is indeed a file too. --- source/cli/run.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cli/run.rs b/source/cli/run.rs index 9ce2ea1..0055a64 100644 --- a/source/cli/run.rs +++ b/source/cli/run.rs @@ -33,7 +33,7 @@ pub fn run() { command: file_subcommand, } => match file_subcommand { FileSubcommand::Exists { file } => { - if !file.exists() { + if !(file.exists() && file.is_file()) { std::process::exit(1); } }