From 1d11b62ca4f4f75a3d0e1a1459c20a74b0b78fa1 Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Fri, 15 Jan 2021 17:51:00 +1100 Subject: [PATCH] Shell: return the exit code of a '-c' command execution --- Userland/Shell/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Shell/main.cpp b/Userland/Shell/main.cpp index 3616919844..76675a2014 100644 --- a/Userland/Shell/main.cpp +++ b/Userland/Shell/main.cpp @@ -176,8 +176,7 @@ int main(int argc, char** argv) if (command_to_run) { dbgln("sh -c '{}'\n", command_to_run); - shell->run_command(command_to_run); - return 0; + return shell->run_command(command_to_run); } if (file_to_read_from && StringView { "-" } != file_to_read_from) {