From 256b362f39a4dd933b6b3af606e8190d25b52d58 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 24 May 2024 09:18:51 +0200 Subject: [PATCH] fix(cli): accept "-" for stdin marker at any position #2 --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3d4acef..b2bb915 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,11 +63,11 @@ pub struct Cli { fn main() { let mut cli = cli_parse(); let mut sources: Vec> = Vec::new(); - if !cli.data_source.is_empty() && cli.data_source[0] != "-" { + if !cli.data_source.is_empty() && !cli.data_source.contains(&"-".to_string()) { for data_source in &cli.data_source { let data_source: PathBuf = PathBuf::from(data_source); if data_source.is_dir() { - warn!("Not a file {:?}, skipping", data_source); + warn!("'{:?}' is a directory and cannot be dumped, skipping", data_source); // std::process::exit(1); continue; }