aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/posix/env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/env.c b/toys/posix/env.c
index 3a251334..01aa5ec4 100644
--- a/toys/posix/env.c
+++ b/toys/posix/env.c
@@ -44,7 +44,7 @@ void env_main(void)
for (; *ev; ev++)
if (strchr(*ev, '=')) xsetenv(xstrdup(*ev), 0);
- else xexec(ev);
+ else toys.stacktop = 0, xexec(ev);
for (ev = environ; *ev; ev++) xprintf("%s%c", *ev, '\n'*!FLAG(0));
}