Skip to content

Commit ea2766f

Browse files
authored
Recommend -S on hashbang (#810)
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 Linux with coreutils >= 8.30 and Mac. Also see privatenumber/tsx#523 and https://unix.stackexchange.com/a/477651.
1 parent 9aad5b0 commit ea2766f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SWCRC=true node -r @swc-node/register script.ts
3030
```
3131

3232
```typescript
33-
#!/usr/bin/env node --import @swc-node/register/esm-register
33+
#!/usr/bin/env -S node --import @swc-node/register/esm-register
3434

3535
// your code
3636
```

0 commit comments

Comments
 (0)