diff options
author | Andre Wiggins <459878+andrewiggins@users.noreply.github.com> | 2023-12-30 08:32:11 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-30 17:32:11 +0100 |
commit | adc1b2503ea63f4ec147554428be98f8037ee8e0 (patch) | |
tree | 220a7db5ab604f81223527a5bac0b26fc63c9697 | |
parent | cd0fdb7ce0501cd101c7bb33352efcf609f72c80 (diff) |
docs(install): Add FAQ entry for installing Starship without sudo (#5648)
Add FAQ entry for installing Starship without sudo
Per [the comment](https://github.com/starship/starship/issues/5190#issuecomment-1553411366) in #5190, I've added an FAQ entry that includes an example script to install Starship without requiring `sudo`.
-rw-r--r-- | docs/faq/README.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/faq/README.md b/docs/faq/README.md index 98ceb0ba6..977c7ae6c 100644 --- a/docs/faq/README.md +++ b/docs/faq/README.md @@ -144,3 +144,11 @@ If Starship was installed using the install script, the following command will d # Locate and delete the starship binary sh -c 'rm "$(command -v 'starship')"' ``` + +## How do I install Starship without `sudo`? + +The shell install script (`https://starship.rs/install.sh`) only attempts to use `sudo` if the target installation directory is not writable by the current user. The default installation diretory is the value of the `$BIN_DIR` environment variable or `/usr/local/bin` if `$BIN_DIR` is not set. If you instead set the installation directory to one that is writable by your user, you should be able to install starship without `sudo`. For example, `curl -sS https://starship.rs/install.sh | sh -s -- -b ~/.local/bin` uses the `-b` command line option of the install script to set the installation directory to `~/.local/bin`. + +For a non-interactive installation of Starship, don't forget to add the `-y` option to skip the confirmation. Check the source of the installation script for a list of all supported installation options. + +When using a package manager, see the documentation for your package manager about installing with or without `sudo`. |