From 9bc591d09d775916a01134d897660187484063f9 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 30 Dec 2021 21:59:05 -0600 Subject: [PATCH] Suppress missing file errors if -f is passed. --- src/ops/put.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ops/put.rs b/src/ops/put.rs index 199414a..555a4bf 100644 --- a/src/ops/put.rs +++ b/src/ops/put.rs @@ -70,7 +70,7 @@ pub fn put(options: PutOptions) -> Result<()> { for path in options.paths.iter() { let abs_path = utils::into_absolute(&path)?; - if !abs_path.exists() { + if !options.force && !abs_path.exists() { errors.push(Error::FileDoesntExist(path.clone())); continue; }