From 8cfda86a459db42e5c361fdc84880f2b2248aab8 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Mon, 18 Jan 2021 04:34:57 +0330 Subject: [PATCH] Shell: Actually return the exit code of the file when running a file --- Userland/Shell/Shell.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp index d63fc3c0a5..c6168b8882 100644 --- a/Userland/Shell/Shell.cpp +++ b/Userland/Shell/Shell.cpp @@ -1036,8 +1036,7 @@ bool Shell::run_file(const String& filename, bool explicitly_invoked) } auto file = file_result.value(); auto data = file->read_all(); - run_command(data); - return true; + return run_command(data) == 0; } void Shell::restore_ios() {