Starship: Unable to install on Windows (Git Bash) - Configuration not found error

Created on 17 Jun 2020  Β·  7Comments  Β·  Source: starship/starship

Bug Report

Current Behavior


An error is occuring on running the command, ./install.sh --bin-dir /c/Users/slapbot/starship/ to install starship (note I have to provide --bin-dir because /usr/local/bin doesn't exists as mentioned in #1310 )

Error:

$ ./install.sh --bin-dir /c/Users/slapbot/starship/

  Configuration
> Bin directory: /c/Users/slapbot/starship/
> Platform:      msys_nt-10.0-19041
> Arch:          x86_64

> Tarball URL: https://github.com/starship/starship/releases/latest/download/starship-x86_64-msys_nt-10.0-19041.tar.gz
? Install Starship latest to /c/Users/slapbot/starship/? [y/N] y
! Bin directory /c/Users/slapbot/starship/ is not in your $PATH
> Installing Starship, please wait…

x Command failed (exit code 22): curl --silent --fail --location https://github.com/starship/starship/releases/latest/download/starship-x86_64-msys_nt-10.0-19041.tar.gz

> This is likely due to Starship not yet supporting your configuration.
> If you would like to see a build for your configuration,
> please create an issue requesting a build for x86_64-msys_nt-10.0-19041:
> https://github.com/starship/starship/issues/new/\n

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Expected Behavior


Clean installation success message after finding the current build.

Additional context/Screenshots

Possible Solution


I think it should simply find this build: https://github.com/starship/starship/releases/download/v0.42.0/starship-x86_64-pc-windows-msvc.zip instead of https://github.com/starship/starship/releases/latest/download/starship-x86_64-msys_nt-10.0-19041.tar.gz leading to configuration error

Environment

  • Starship version: latest (0.42.0)
  • Shell type: bash
  • Shell version: Bash On Windows (GNU bash, version 4.4.23(1)-release (x86_64-pc-msys))
  • Terminal emulator: Windows Terminal
  • Operating system: [Windows 10]
πŸ› bug πŸ’» new platform

Most helpful comment

Yay! Now it works as expected.

Just one small reminder for others who stumble on this issue is to remember to add your bin-dir to your path. So to recap:

  1. Download the install.sh: curl -fsSL https://starship.rs/install.sh > ./install.sh
  2. Make/Choose folder where to install: mkdir ~/starship
  3. Install starship: ./install.sh --bin-dir /c/Users/<username>/starship/ --platform pc-windows-msvc
  4. Finally add the settings in .bashrc file:
# Starship configuration
export PATH=$PATH:"/c/Users/<username>/starship"
eval "$(starship init bash)"
  1. Run: source ~/.bashrc

And you got an amazing prompt running! πŸŽ‰

Thanks for all of the work guys, always wanted something like oh-my-zsh but for bash (since zsh isn't available on Windows unless you wanna instally cygwin or something similar!) - Hoping you can make the current installation a bit more seamless by adjusting your install script. :)

All 7 comments

Yep, that's a failure in our platform detection scripts.

Could you try running with the additional flag --platform pc-windows-msvc? That would make your total command

./install.sh --bin-dir /c/Users/slapbot/starship/ --platform pc-windows-msvc`

That should bypass automatic platform detection. If the script + starship work as expected afterwards, we'll add msys to our platform detection.

Yay! Now it works as expected.

Just one small reminder for others who stumble on this issue is to remember to add your bin-dir to your path. So to recap:

  1. Download the install.sh: curl -fsSL https://starship.rs/install.sh > ./install.sh
  2. Make/Choose folder where to install: mkdir ~/starship
  3. Install starship: ./install.sh --bin-dir /c/Users/<username>/starship/ --platform pc-windows-msvc
  4. Finally add the settings in .bashrc file:
# Starship configuration
export PATH=$PATH:"/c/Users/<username>/starship"
eval "$(starship init bash)"
  1. Run: source ~/.bashrc

And you got an amazing prompt running! πŸŽ‰

Thanks for all of the work guys, always wanted something like oh-my-zsh but for bash (since zsh isn't available on Windows unless you wanna instally cygwin or something similar!) - Hoping you can make the current installation a bit more seamless by adjusting your install script. :)

Yep, that's a failure in our platform detection scripts.

@chipbuster I'll take care of it inside https://github.com/starship/starship/pull/1315

@SlapBot Thank you for the extensive and elaborate report πŸ‘ Just a quick question you were running this under git bash or WSL?

@vladimyr #1315 is already big enough. If you want to tackle it, could you open a draft PR based on #1315 and then open it once #1315 merges? We can also deal with #1310 in that PR (the "Windows quality of life upgrade" or something)

Even better πŸ‘

Thank you for the extensive and elaborate report πŸ‘ Just a quick question you were running this under git bash or WSL?

@vladimyr - No problems! Running it under Git Bash.

@vladimyr - No problems! Running it under Git Bash.

Thanks πŸ‘

Was this page helpful?
0 / 5 - 0 ratings