Expose errors early when possible

This commit is contained in:
JT
2021-10-12 07:45:31 +13:00
parent 020143d050
commit 38bc394a12
10 changed files with 167 additions and 140 deletions

View File

@ -61,7 +61,7 @@ impl Command for If {
Ok(Value::Nothing { span })
}
}
_ => Err(ShellError::CantConvert("bool".into(), result.span())),
_ => Err(ShellError::CantConvert("bool".into(), result.span()?)),
}
}
}