swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.78k stars 75 forks source link

docs: recommend `-S` on hashbang #810

Closed silverwind closed 2 months ago

silverwind commented 2 months ago

The previous hashbang did not work on Linux coreutils env because env passes the arguments as single string to node. By adding -S we can make it split the arguments and this works on both GNU coreutils >= 8.30 and BSD env (probably since 2005) used on MacOS.

Also see https://github.com/privatenumber/tsx/pull/523 and https://unix.stackexchange.com/a/477651.

silverwind commented 2 months ago

I see line 38 needs the change as well, will test that.