Properly fail when helper fails

This commit is contained in:
Olivier 'reivilibre' 2021-09-13 19:52:55 +01:00
parent 594ead0f70
commit 6a05aa8083
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ along with Yama. If not, see <https://www.gnu.org/licenses/>.
use crate::descriptor::{Descriptor, DestPileDescriptor, SourceDescriptor, VirtualSourceKind};
use crate::labelling::{label_node, load_labelling_rules, str_to_label, Label, State};
use crate::tree::{scan, FileTree, FileTree1};
use anyhow::anyhow;
use anyhow::{anyhow, bail};
use arc_interner::ArcIntern;
use chrono::{DateTime, Utc};
use log::{error, info, warn};
@ -226,7 +226,7 @@ pub fn backup_source_to_destination(
let exit_status = process.wait()?;
if !exit_status.success() {
error!(
bail!(
"The process was not successful (exit code {}). Exiting.",
exit_status.code().unwrap()
);