Use /usr/bin/env bash instead of /bin/bash for GitHub CLI extensions shebang (#9962)
This commit is contained in:
@@ -48,7 +48,7 @@ You can use the `gh extension create` command to create a project for your exten
|
||||
1. Write your script in the executable file. For example:
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
exec gh api user --jq '"You are @\(.login) (\(.name))."'
|
||||
```
|
||||
@@ -84,7 +84,7 @@ All command line arguments following a `gh my-extension-name` command will be pa
|
||||
For example, this script handles multiple flags. When the script is called with the `-h` or `--help` flag, the script prints help text instead of continuing execution. When the script is called with the `--name` flag, the script sets the next value after the flag to `name_arg`. When the script is called with the `--verbose` flag, the script prints a different greeting.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
verbose=""
|
||||
@@ -149,4 +149,4 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g
|
||||
|
||||
## Next steps
|
||||
|
||||
To see more examples of {% data variables.product.prodname_cli %} extensions, look at [repositories with the `gh-extension` topic](https://github.com/topics/gh-extension).
|
||||
To see more examples of {% data variables.product.prodname_cli %} extensions, look at [repositories with the `gh-extension` topic](https://github.com/topics/gh-extension).
|
||||
|
||||
Reference in New Issue
Block a user