Skip to content

Commit 1eb05eb

Browse files
committed
fixed regression preventing globbing with add cmd
1 parent c503fe8 commit 1eb05eb

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/symlinks.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -579,14 +579,6 @@ pub fn add_cmd(
579579

580580
let mut sym = SymlinkHandler::try_new(ctx)?;
581581

582-
if let Some(nonexistent_groups) = get_nonexistent_groups_with_no_related_groups(&sym, groups) {
583-
for group in nonexistent_groups {
584-
eprintln!("{}", t!("errors.x_doesnt_exist", x = group).red());
585-
}
586-
587-
return Err(ReturnCode::NoSetupFolder.into());
588-
};
589-
590582
fn add_group(
591583
ctx: &Context,
592584
sym: &mut SymlinkHandler,
@@ -666,6 +658,16 @@ pub fn add_cmd(
666658
}
667659
}
668660
} else {
661+
if let Some(nonexistent_groups) =
662+
get_nonexistent_groups_with_no_related_groups(&sym, groups)
663+
{
664+
for group in nonexistent_groups {
665+
eprintln!("{}", t!("errors.x_doesnt_exist", x = group).red());
666+
}
667+
668+
return Err(ReturnCode::NoSetupFolder.into());
669+
};
670+
669671
let groups = {
670672
let mut related_groups = Vec::new();
671673

@@ -739,7 +741,7 @@ pub fn remove_cmd(ctx: &Context, groups: &[String], exclude: &[String]) -> Resul
739741
}
740742

741743
return Err(ReturnCode::NoSetupFolder.into());
742-
};
744+
}
743745

744746
let related_groups: Vec<_> = sym
745747
.symlinked

0 commit comments

Comments
 (0)