Fixed signature

This commit is contained in:
NotTheDr01ds 2024-06-24 00:42:20 -04:00
parent 4509944988
commit 01ad1ca5f9
2 changed files with 3 additions and 7 deletions

View File

@ -23,11 +23,7 @@ impl Command for Do {
fn signature(&self) -> Signature {
Signature::build("do")
.required(
"closure",
SyntaxShape::OneOf(vec![SyntaxShape::Closure(None), SyntaxShape::Any]),
"The closure to run.",
)
.required("closure", SyntaxShape::Closure(None), "The closure to run.")
.input_output_types(vec![(Type::Any, Type::Any)])
.switch(
"ignore-errors",

View File

@ -38,8 +38,8 @@ def assert_error [] {
assert error $failing_code
let good_code = {|| }
let assert_error_raised = (try { do assert $good_code; false } catch { true })
assert $assert_error_raised "The assert error should raise an error if there is no error in the executed code."
let assert_error_raised = (try { assert error $good_code; false } catch { true })
assert $assert_error_raised "The assert error should be false if there is no error in the executed code."
}
#[test]