sh: Print "exit" on EOF only when the shell is in interactive mode
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-05-26 17:29:41 +02:00
parent 84c1871d30
commit 4dcee8f828
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -88,7 +88,7 @@ Result<int> luna_main(int argc, char** argv)
auto cmd = TRY(input_file->read_line()); auto cmd = TRY(input_file->read_line());
if (cmd.is_empty()) if (cmd.is_empty())
{ {
puts("exit"); if (interactive) puts("exit");
break; break;
} }