From 4dcee8f828b85c4110e20f1c3ff00b11ffa11753 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 26 May 2023 17:29:41 +0200 Subject: [PATCH] sh: Print "exit" on EOF only when the shell is in interactive mode --- apps/sh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sh.cpp b/apps/sh.cpp index 44980b92..e51a6f9e 100644 --- a/apps/sh.cpp +++ b/apps/sh.cpp @@ -88,7 +88,7 @@ Result luna_main(int argc, char** argv) auto cmd = TRY(input_file->read_line()); if (cmd.is_empty()) { - puts("exit"); + if (interactive) puts("exit"); break; }