Skip to content

Commit 500a0c0

Browse files
authored
Use /usr/bin/env bash instead of /bin/bash for GitHub CLI extensions shebang (github#9962)
1 parent 5841c66 commit 500a0c0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

content/github-cli/github-cli/creating-github-cli-extensions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You can use the `gh extension create` command to create a project for your exten
4848
1. Write your script in the executable file. For example:
4949

5050
```bash
51-
#!/bin/bash
51+
#!/usr/bin/env bash
5252
set -e
5353
exec gh api user --jq '"You are @\(.login) (\(.name))."'
5454
```
@@ -84,7 +84,7 @@ All command line arguments following a `gh my-extension-name` command will be pa
8484
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.
8585

8686
```bash
87-
#!/bin/bash
87+
#!/usr/bin/env bash
8888
set -e
8989
9090
verbose=""
@@ -149,4 +149,4 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g
149149
150150
## Next steps
151151
152-
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).
152+
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).

0 commit comments

Comments
 (0)