From 74f80812901153deb0b640c2ed59fa3ba8db1d5a Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sun, 20 Aug 2023 07:30:54 -0500 Subject: [PATCH] allow `return` to return any nushell value (#10067) # Description This PR allows the `return` command to return any nushell value. ### Before ![image](https://github.com/nushell/nushell/assets/343840/2c0a70d7-86e4-4c7f-bd3a-d7c7d74b1c1a) ### After ![image](https://github.com/nushell/nushell/assets/343840/f428d486-4a4f-4058-a29f-7d7a845e08f7) # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-cmd-lang/src/core_commands/return_.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-cmd-lang/src/core_commands/return_.rs b/crates/nu-cmd-lang/src/core_commands/return_.rs index 80cdb27d45..b59500565f 100644 --- a/crates/nu-cmd-lang/src/core_commands/return_.rs +++ b/crates/nu-cmd-lang/src/core_commands/return_.rs @@ -19,7 +19,7 @@ impl Command for Return { fn signature(&self) -> nu_protocol::Signature { Signature::build("return") - .input_output_types(vec![(Type::Nothing, Type::Nothing)]) + .input_output_types(vec![(Type::Nothing, Type::Any)]) .optional("return_value", SyntaxShape::Any, "optional value to return") .category(Category::Core) }