command/apply: Use verbose output when goal is "dry-activate"

It doesn't make sense to use the spinners since you can't see
the full output from the activation script.

Fixes #44.
This commit is contained in:
Zhaofeng Li 2021-12-04 01:03:26 -08:00
parent 7b1feffb9e
commit 7757a0e45d

View file

@ -128,7 +128,8 @@ pub async fn run(_global_args: &ArgMatches<'_>, local_args: &ArgMatches<'_>) ->
let targets = hive.select_nodes(filter, ssh_config, goal.requires_target_host()).await?; let targets = hive.select_nodes(filter, ssh_config, goal.requires_target_host()).await?;
let n_targets = targets.len(); let n_targets = targets.len();
let mut output = SimpleProgressOutput::new(local_args.is_present("verbose")); let verbose = local_args.is_present("verbose") || goal == Goal::DryActivate;
let mut output = SimpleProgressOutput::new(verbose);
let progress = output.get_sender(); let progress = output.get_sender();
let mut deployment = Deployment::new(hive, targets, goal, progress); let mut deployment = Deployment::new(hive, targets, goal, progress);