Skip to content

refactor: improve flag interpretation for install.sh #9554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
🧼
  • Loading branch information
aslilac committed Sep 6, 2023
commit 30df5a7ab122a764949916b1e22036e24c8712bf
28 changes: 14 additions & 14 deletions docs/install/install.sh.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,23 @@ By default, the Coder server runs on `http://127.0.0.1:3000` and uses a

## `PATH` conflicts

It's possible to end up in situations where you have multiple `coder`
binaries in your `PATH`, and your system may use a version that you don't
intend. Your `PATH` is a variable that tells your shell where to look for
programs to run.
It's possible to end up in situations where you have multiple `coder` binaries
in your `PATH`, and your system may use a version that you don't intend. Your
`PATH` is a variable that tells your shell where to look for programs to run.

You can check where all of the versions are by running `which -a coder`.

For example, a common conflict on macOS might be between a version
installed by Homebrew, and a version installed manually to the /usr/local/bin
directory.
For example, a common conflict on macOS might be between a version installed by
Homebrew, and a version installed manually to the /usr/local/bin directory.

```console
$ which -a coder
/usr/local/bin/coder
/opt/homebrew/bin/coder
```

Whichever binary comes first in this list will be used when running `coder` commands.
Whichever binary comes first in this list will be used when running `coder`
commands.

### Reordering your `PATH`

Expand All @@ -71,8 +70,9 @@ If you use fish, you can update your `PATH` like this:
fish_add_path "/opt/homebrew/bin"
```

> ℹ If you ran install.sh with a `--prefix` flag, you can replace `/opt/homebrew`
> with whatever value you used there. Make sure to leave the `/bin` at the end!
> ℹ If you ran install.sh with a `--prefix` flag, you can replace
> `/opt/homebrew` with whatever value you used there. Make sure to leave the
> `/bin` at the end!

Now we can observe that the order has changed:

Expand All @@ -84,8 +84,8 @@ $ which -a coder

### Removing unneeded binaries

If you want to uninstall a version of `coder` that you installed with a package manager,
you can run whichever one of these commands applies:
If you want to uninstall a version of `coder` that you installed with a package
manager, you can run whichever one of these commands applies:

```shell
# On macOS, with Homebrew installed
Expand All @@ -107,8 +107,8 @@ sudo rpm -e coder
sudo apk del coder
```

If the conflicting binary is not installed by your system package manager,
you can just delete it.
If the conflicting binary is not installed by your system package manager, you
can just delete it.

```shell
# You might not need `sudo`, depending on the location
Expand Down