diff --git a/crates/nu-cmd-lang/src/core_commands/do_.rs b/crates/nu-cmd-lang/src/core_commands/do_.rs index 4f0bd245d2..adf13cc0bb 100644 --- a/crates/nu-cmd-lang/src/core_commands/do_.rs +++ b/crates/nu-cmd-lang/src/core_commands/do_.rs @@ -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", diff --git a/crates/nu-std/tests/test_asserts.nu b/crates/nu-std/tests/test_asserts.nu index b155022473..2447dfda1e 100644 --- a/crates/nu-std/tests/test_asserts.nu +++ b/crates/nu-std/tests/test_asserts.nu @@ -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]