mirror of
https://github.com/casey/just.git
synced 2024-11-23 02:44:56 +03:00
Document using env -S
(#2038)
This commit is contained in:
parent
2d9cfa202f
commit
e2c9405fa9
13
README.md
13
README.md
@ -2135,8 +2135,17 @@ the file as executable, and executing it. The OS then parses the shebang line
|
||||
into a command line and invokes it, including the path to the file. For
|
||||
example, if a recipe starts with `#!/usr/bin/env bash`, the final command that
|
||||
the OS runs will be something like `/usr/bin/env bash
|
||||
/tmp/PATH_TO_SAVED_RECIPE_BODY`. Keep in mind that different operating systems
|
||||
split shebang lines differently.
|
||||
/tmp/PATH_TO_SAVED_RECIPE_BODY`.
|
||||
|
||||
Shebang line splitting is operating system dependent. When passing a command
|
||||
with arguments, you may need to tell `env` to split them explicitly by using
|
||||
the `-S` flag:
|
||||
|
||||
```just
|
||||
run:
|
||||
#!/usr/bin/env -S bash -x
|
||||
ls
|
||||
```
|
||||
|
||||
Windows does not support shebang lines. On Windows, `just` splits the shebang
|
||||
line into a command and arguments, saves the recipe body to a file, and invokes
|
||||
|
Loading…
Reference in New Issue
Block a user