From 04ec1575177709dd3c1bd147cb8d0966237663d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 28 Nov 2022 10:38:23 +0100 Subject: [PATCH 1/2] repl: print a newline on ctrl-D --- src/libcmd/repl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index bb254ff8d..ddf0d9a0a 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -270,6 +270,7 @@ void NixRepl::mainLoop() // ctrl-D should exit the debugger. state->debugStop = false; state->debugQuit = true; + std::cout << std::endl; break; } try { From 9b35cc716b392dfb96a0e994349137f653b9c532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Mon, 28 Nov 2022 14:59:06 +0100 Subject: [PATCH 2/2] use logger->cout in order to avoid potential problems with the progress bar Co-authored-by: Eelco Dolstra --- src/libcmd/repl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index ddf0d9a0a..557952277 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -270,7 +270,7 @@ void NixRepl::mainLoop() // ctrl-D should exit the debugger. state->debugStop = false; state->debugQuit = true; - std::cout << std::endl; + logger->cout(""); break; } try {