运行命令./install.sh --bin-dir /c/Users/slapbot/starship/
来安装星际飞船时发生错误(请注意,我必须提供--bin-dir,因为/ usr / local / bin不存在,如#1310所述)
错误:
$ ./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
找到当前内部版本后,请清除安装成功消息。
我认为它应该只是找到此构建: https : https://github.com/ starship / starship / releases / latest / download / starship-x86_64-msys_nt-10.0-19041.tar.gz导致配置错误
是的,这是我们平台检测脚本中的失败。
您可以尝试使用其他标志--platform pc-windows-msvc
吗? 那将使您总命令
./install.sh --bin-dir /c/Users/slapbot/starship/ --platform pc-windows-msvc`
那应该绕过自动平台检测。 如果脚本+星舰随后能按预期工作,则将msys添加到平台检测中。
好极了! 现在它可以按预期工作了。
对于其他偶然发现此问题的人,一个小提醒是要记住将bin-dir
到路径中。 因此,回顾一下:
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
而且您得到了惊人的提示! 🎉
感谢所有工作人员,总是想要oh-my-zsh之类的东西,但要进行bash(因为Windows上不提供zsh,除非您想安装cygwin或类似的东西!)-希望您可以使当前的安装更多一些通过调整安装脚本实现无缝连接。 :)
是的,这是我们平台检测脚本中的失败。
@chipbuster我会在https://github.com/starship/starship/pull/1315里面处理它
@SlapBot感谢您提供详尽详尽的报告👍只是一个简单的问题,您是在git bash还是WSL下运行它?
@vladimyr #1315已经足够大了。 如果您想解决该问题,是否可以基于#1315打开草稿PR,然后在#1315合并后将其打开? 我们还可以在该PR中处理#1310(“ Windows生活质量升级”之类的东西)
更好better
谢谢您提供详尽详尽的报告👍只是一个简单的问题,您是在git bash还是WSL下运行它?
@vladimyr-没问题! 在Git Bash下运行它。
@vladimyr-没问题! 在Git Bash下运行它。
谢谢👍
最有用的评论
好极了! 现在它可以按预期工作了。
对于其他偶然发现此问题的人,一个小提醒是要记住将
bin-dir
到路径中。 因此,回顾一下: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
而且您得到了惊人的提示! 🎉
感谢所有工作人员,总是想要oh-my-zsh之类的东西,但要进行bash(因为Windows上不提供zsh,除非您想安装cygwin或类似的东西!)-希望您可以使当前的安装更多一些通过调整安装脚本实现无缝连接。 :)