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
Clean installation success message after finding the current build.
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
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:
curl -fsSL https://starship.rs/install.sh > ./install.sh
mkdir ~/starship
./install.sh --bin-dir /c/Users/<username>/starship/ --platform pc-windows-msvc
# Starship configuration
export PATH=$PATH:"/c/Users/<username>/starship"
eval "$(starship init bash)"
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 π
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:curl -fsSL https://starship.rs/install.sh > ./install.sh
mkdir ~/starship
./install.sh --bin-dir /c/Users/<username>/starship/ --platform pc-windows-msvc
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. :)