From dcc36f3984624314dd5a6776405e2b0f9db1abef Mon Sep 17 00:00:00 2001 From: cepetr Date: Wed, 20 Aug 2025 11:15:03 +0200 Subject: [PATCH] fix(prodtest): remove extra crlf in response in non-interactive mode --- core/embed/projects/prodtest/.changelog.d/5595.fixed | 1 + core/embed/rtl/cli.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 core/embed/projects/prodtest/.changelog.d/5595.fixed diff --git a/core/embed/projects/prodtest/.changelog.d/5595.fixed b/core/embed/projects/prodtest/.changelog.d/5595.fixed new file mode 100644 index 00000000000..6c36cbba18e --- /dev/null +++ b/core/embed/projects/prodtest/.changelog.d/5595.fixed @@ -0,0 +1 @@ +Removed the extra CRLF added to each response line in non-interactive mode. diff --git a/core/embed/rtl/cli.c b/core/embed/rtl/cli.c index 07b37a1ed5b..6f061f91c99 100644 --- a/core/embed/rtl/cli.c +++ b/core/embed/rtl/cli.c @@ -551,12 +551,11 @@ void cli_process_command(cli_t* cli, const cli_command_t* cmd) { cli_error(cli, CLI_ERROR_FATAL, "Command handler didn't finish properly."); } - } else { - // Finalize the last command with an empty line - cli_printf(cli, "\r\n"); } if (cli->interactive) { + // Finalize the last command with an empty line + cli_printf(cli, "\r\n"); // Print the prompt cli_printf(cli, "> "); }