Make file exists check if it is indeed a file too.
This commit is contained in:
parent
115b99ee66
commit
fea8ebc73a
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue