diff --git a/crates/core/src/commands/backup.rs b/crates/core/src/commands/backup.rs index fbb59de9..e80ea30d 100644 --- a/crates/core/src/commands/backup.rs +++ b/crates/core/src/commands/backup.rs @@ -251,8 +251,8 @@ pub(crate) fn backup( let p = repo.pb.progress_bytes("backing up..."); let snap = if backup_stdin { + let path = &backup_path[0]; if let Some(command) = &opts.stdin_command { - let path = &backup_path[0]; let src = ChildStdoutSource::new(command, path.clone())?; let res = archiver.archive( &src, @@ -265,7 +265,6 @@ pub(crate) fn backup( src.finish()?; res } else { - let path = &backup_path[0]; let src = StdinSource::new(path.clone()); archiver.archive( &src,