aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 8115559f..0738a178 100644
--- a/main.c
+++ b/main.c
@@ -163,7 +163,10 @@ void toybox_main(void)
xputs(TOYBOX_VERSION);
xexit();
}
- if (toys.argv[1][0] != '-') error_exit("Unknown command %s", toys.argv[1]);
+ if (toys.argv[1][0] != '-') {
+ toys.exitval = 127;
+ error_exit("Unknown command %s", toys.argv[1]);
+ }
}
// Output list of command.