changeset 1587:a35ea98b4972 draft

The "re-exec to regain root permissions" logic broke the error message when calling root-only commands through the multiplexer. It would say "no such command" when it should say "not root".
author Rob Landley <rob@landley.net>
date Sat, 29 Nov 2014 21:11:34 -0600
parents 6db5787d340b
children b1152edad697
files main.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Sat Nov 29 19:07:08 2014 -0600
+++ b/main.c	Sat Nov 29 21:11:34 2014 -0600
@@ -149,7 +149,7 @@
 
   toys.which = toy_list;
   if (toys.argv[1]) {
-    toys.optc = 0;
+    toys.optc = toys.recursion = 0;
     toy_exec(toys.argv+1);
     if (toys.argv[1][0] == '-') goto list;