diff options
Diffstat (limited to 'toys')
-rw-r--r-- | toys/posix/env.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/toys/posix/env.c b/toys/posix/env.c index 01aa5ec4..19cd18a0 100644 --- a/toys/posix/env.c +++ b/toys/posix/env.c @@ -44,7 +44,11 @@ void env_main(void) for (; *ev; ev++) if (strchr(*ev, '=')) xsetenv(xstrdup(*ev), 0); - else toys.stacktop = 0, xexec(ev); + else { + // a common use of env is to bypass shell builtins + toys.stacktop = 0; + xexec(ev); + } for (ev = environ; *ev; ev++) xprintf("%s%c", *ev, '\n'*!FLAG(0)); } |