Suppress missing file errors if -f is passed.

This commit is contained in:
Michael Zhang 2021-12-30 21:59:05 -06:00
parent 53041af73c
commit 9bc591d09d
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B

View file

@ -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;
}