forked from DGNum/colmena
parent
0209b6dc40
commit
432d4212fc
1 changed files with 4 additions and 4 deletions
|
@ -147,11 +147,14 @@ pub async fn run(_global_args: &ArgMatches, local_args: &ArgMatches) -> Result<(
|
|||
let ssh_config = env::var("SSH_CONFIG_FILE")
|
||||
.ok().map(PathBuf::from);
|
||||
|
||||
let goal_arg = local_args.value_of("goal").unwrap();
|
||||
let goal = Goal::from_str(goal_arg).unwrap();
|
||||
|
||||
let filter = local_args.value_of("on")
|
||||
.map(NodeFilter::new)
|
||||
.transpose()?;
|
||||
|
||||
if !filter.is_some() {
|
||||
if !filter.is_some() && goal != Goal::Build {
|
||||
// User did not specify node, we should check meta and see rules
|
||||
let meta = hive.get_meta_config().await?;
|
||||
if !meta.allow_apply_all {
|
||||
|
@ -161,9 +164,6 @@ pub async fn run(_global_args: &ArgMatches, local_args: &ArgMatches) -> Result<(
|
|||
}
|
||||
}
|
||||
|
||||
let goal_arg = local_args.value_of("goal").unwrap();
|
||||
let goal = Goal::from_str(goal_arg).unwrap();
|
||||
|
||||
let targets = hive.select_nodes(filter, ssh_config, goal.requires_target_host()).await?;
|
||||
let n_targets = targets.len();
|
||||
|
||||
|
|
Loading…
Reference in a new issue