docs: update

This commit is contained in:
Dylan Araps 2019-09-20 08:53:15 +03:00
parent 4b3b44a3f3
commit f1301357da
2 changed files with 8 additions and 2 deletions

View File

@ -1562,12 +1562,15 @@ Use `#!/usr/bin/env bash` instead of `#!/bin/bash`.
- The former searches the user's `PATH` to find the `bash` binary. - The former searches the user's `PATH` to find the `bash` binary.
- The latter assumes it is always installed to `/bin/` which can cause issues. - The latter assumes it is always installed to `/bin/` which can cause issues.
**NOTE**: There are times when one may have a good reason for using `#!/bin/bash` or another direct path to the binary.
```shell ```shell
# Right: # Right:
#!/usr/bin/env bash #!/usr/bin/env bash
# Wrong: # Less right:
#!/bin/bash #!/bin/bash
``` ```

View File

@ -7,12 +7,15 @@ Use `#!/usr/bin/env bash` instead of `#!/bin/bash`.
- The former searches the user's `PATH` to find the `bash` binary. - The former searches the user's `PATH` to find the `bash` binary.
- The latter assumes it is always installed to `/bin/` which can cause issues. - The latter assumes it is always installed to `/bin/` which can cause issues.
**NOTE**: There are times when one may have a good reason for using `#!/bin/bash` or another direct path to the binary.
```shell ```shell
# Right: # Right:
#!/usr/bin/env bash #!/usr/bin/env bash
# Wrong: # Less right:
#!/bin/bash #!/bin/bash
``` ```