X Tutup
Skip to content

Commit c115d32

Browse files
author
Nate Smith
authored
Merge pull request cli#923 from cli/install-source
Change source installation docs to avoid suggesting to change PATH
2 parents e28e609 + e3676c3 commit c115d32

File tree

1 file changed

+25
-33
lines changed

1 file changed

+25
-33
lines changed

docs/source.md

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,29 @@
11
# Installation from source
22

33
0. Verify that you have Go 1.14+ installed
4-
```
5-
$ go version
6-
go version go1.14
7-
```
8-
9-
1. Clone cli into `~/.githubcli`
10-
```
11-
$ git clone https://github.com/cli/cli.git ~/.githubcli
12-
```
13-
14-
2. Compile
15-
```
16-
$ cd ~/.githubcli && make
17-
```
18-
19-
3. Add `~/.githubcli/bin` to your $PATH for access to the gh command-line utility.
20-
21-
* For **bash**:
22-
~~~ bash
23-
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.bash_profile
24-
~~~
25-
26-
* For **Zsh**:
27-
~~~ zsh
28-
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.zshrc
29-
~~~
30-
31-
* For **Fish shell**:
32-
~~~ fish
33-
$ set -Ux fish_user_paths $HOME/.githubcli/bin $fish_user_paths
34-
~~~
35-
36-
4. Restart your shell so that PATH changes take effect.
374

5+
```sh
6+
$ go version
7+
go version go1.14
8+
```
9+
10+
1. Clone this repository
11+
12+
```sh
13+
$ git clone https://github.com/cli/cli.git gh-cli
14+
$ cd gh-cli
15+
```
16+
17+
2. Build the project
18+
19+
```
20+
$ make
21+
```
22+
23+
3. Move the resulting `bin/gh` executable to somewhere in your PATH
24+
25+
```sh
26+
$ sudo mv ./bin/gh /usr/local/bin/
27+
```
28+
29+
4. Run `gh version` to check if it worked.

0 commit comments

Comments
 (0)
X Tutup