summaryrefslogtreecommitdiff
path: root/Userland/Shell
diff options
context:
space:
mode:
authorNick Vella <nick@nxk.io>2021-01-15 17:51:00 +1100
committerAndreas Kling <kling@serenityos.org>2021-01-16 09:05:01 +0100
commit1d11b62ca4f4f75a3d0e1a1459c20a74b0b78fa1 (patch)
tree69c569213d12dcb9970e73f4ba5d764ce7e9ba63 /Userland/Shell
parentd1e3193339524ea65da146757fc5160cbf2a907f (diff)
downloadserenity-1d11b62ca4f4f75a3d0e1a1459c20a74b0b78fa1.zip
Shell: return the exit code of a '-c' command execution
Diffstat (limited to 'Userland/Shell')
-rw-r--r--Userland/Shell/main.cpp3
1 files changed, 1 insertions, 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) {