Fix executor panic (fix #653)

This commit is contained in:
Roey Darwish Dror
2021-02-27 06:41:55 +02:00
parent 23d9a5bf63
commit 5da219ed69
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
use crate::ctrlc;
use crate::error::SkipStep;
use crate::error::{DryRun, SkipStep};
use crate::execution_context::ExecutionContext;
use crate::report::{Report, StepResult};
use crate::{config::Step, terminal::should_retry};
@@ -39,6 +39,7 @@ impl<'a> Runner<'a> {
self.report.push_result(Some((key, StepResult::Success)));
break;
}
Err(e) if e.downcast_ref::<DryRun>().is_some() => break,
Err(e) if e.downcast_ref::<SkipStep>().is_some() => {
if self.ctx.config().verbose() || self.ctx.config().show_skipped() {
self.report.push_result(Some((key, StepResult::Skipped(e.to_string()))));