From 17caa3132577031d9b3ead8e481e9cab204d41b2 Mon Sep 17 00:00:00 2001 From: Ian Manske Date: Tue, 18 Jul 2023 22:02:09 +0000 Subject: [PATCH] nushell should be non-interactive if `--testbin` is supplied (#9730) # Description After #9693, tests will stop and go into the background if run locally in bash, since nushell is being run in interactive mode even though `--testbin` is supplied. This makes nushell run in non-interactive mode if `--testbin` is supplied. --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 630518389c..1efa9ac295 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,7 +83,9 @@ fn main() -> Result<()> { // keep this condition in sync with the branches at the end engine_state.is_interactive = parsed_nu_cli_args.interactive_shell.is_some() - || (parsed_nu_cli_args.commands.is_none() && script_name.is_empty()); + || (parsed_nu_cli_args.testbin.is_none() + && parsed_nu_cli_args.commands.is_none() + && script_name.is_empty()); engine_state.is_login = parsed_nu_cli_args.login_shell.is_some();