From e7acb4749dc655fee22d08f2723ea783f0d75fb6 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 7 Apr 2015 11:54:36 -0500 Subject: Adding --version broke ./toybox command list. (Oops.) --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index dbc39bec..a800deea 100644 --- a/main.c +++ b/main.c @@ -157,12 +157,15 @@ void toybox_main(void) if (toys.argv[1]) { toys.optc = toys.recursion = 0; toy_exec(toys.argv+1); + if (!strcmp("--version", toys.argv[1])) { + xputs(TOYBOX_VERSION); + xexit(); + } if (toys.argv[1][0] != '-') error_exit("Unknown command %s", toys.argv[1]); } - if (!strcmp("--version", toys.argv[1])) printf(TOYBOX_VERSION); // Output list of command. - else for (i=1; i