From 5822475e0d0be7825406c4f4197375a532fc831f Mon Sep 17 00:00:00 2001 From: Denys Nykula Date: Fri, 5 Jul 2019 14:27:24 +0000 Subject: 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. --- toys/posix/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix') 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)); } -- cgit v1.2.3