Closed shakyShane closed 4 years ago
adds conditional task type - for example:
here all conditions must be met with Answer:Yes (either in code or by user input) - if all conditions are met then the second vec of tasks will be executed.
Answer:Yes
vec
Task::conditional( vec![ Box::new(FilePresent::new(left_abs.clone())), Box::new(FilePresent::new(right_abs.clone())), Box::new(FilesDiffer::new(left_abs.clone(), right_abs.clone())), Box::new(Question::new(question)), ], vec![ Task::file_clone(right_abs, left_abs), Task::notify(format!("{}: Copied {} to {}", prefix, Cyan.paint(RIGHT), Cyan.paint(LEFT))), Task::notify(format!("{}", warning)), ], )
adds conditional task type - for example:
here all conditions must be met with
Answer:Yes
(either in code or by user input) - if all conditions are met then the secondvec
of tasks will be executed.