aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Nykula <nykula@ukr.net>2019-07-05 14:27:24 +0000
committerRob Landley <rob@landley.net>2019-07-06 15:01:12 -0500
commit5822475e0d0be7825406c4f4197375a532fc831f (patch)
tree4acb41c5d9b3adc96838135fc267e7ffa9ccd292
parent1e4cb6cae92d8cd2070d9388d10b0e01d6cf8f68 (diff)
downloadtoybox-5822475e0d0be7825406c4f4197375a532fc831f.tar.gz
Have env exec, not recurse to builtin.
My app runs npm i -S better-sqlite3, and node-gyp-bin from the npm upstream has #!/usr/bin/env sh, expecting the system shell.
-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));
}