Starship: 无法在Windows(Git Bash)上安装-找不到配置错误

创建于 2020-06-17  ·  7评论  ·  资料来源: starship/starship

错误报告

当前行为


运行命令./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导致配置错误

环境

  • 星际飞船版本:最新(0.42.0)
  • 贝壳类型:bash
  • Shell版本:Windows上的Bash(GNU bash,版本4.4.23(1)-发行版(x86_64-pc-msys))
  • 终端模拟器:Windows终端
  • 操作系统:[Windows 10]
🐛 bug 💻 new platform

最有用的评论

好极了! 现在它可以按预期工作了。

对于其他偶然发现此问题的人,一个小提醒是要记住将bin-dir到路径中。 因此,回顾一下:

  1. 下载install.sh:$#$ curl -fsSL https://starship.rs/install.sh > ./install.sh
  2. 制作/选择要安装的文件夹: mkdir ~/starship
  3. 安装星舰: ./install.sh --bin-dir /c/Users/<username>/starship/ --platform pc-windows-msvc
  4. 最后,将设置添加到.bashrc文件中:
# Starship configuration
export PATH=$PATH:"/c/Users/<username>/starship"
eval "$(starship init bash)"
  1. 运行: source ~/.bashrc

而且您得到了惊人的提示! 🎉

感谢所有工作人员,总是想要oh-my-zsh之类的东西,但要进行bash(因为Windows上不提供zsh,除非您想安装cygwin或类似的东西!)-希望您可以使当前的安装更多一些通过调整安装脚本实现无缝连接。 :)

所有7条评论

是的,这是我们平台检测脚本中的失败。

您可以尝试使用其他标志--platform pc-windows-msvc吗? 那将使您总命令

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

那应该绕过自动平台检测。 如果脚本+星舰随后能按预期工作,则将msys添加到平台检测中。

好极了! 现在它可以按预期工作了。

对于其他偶然发现此问题的人,一个小提醒是要记住将bin-dir到路径中。 因此,回顾一下:

  1. 下载install.sh:$#$ curl -fsSL https://starship.rs/install.sh > ./install.sh
  2. 制作/选择要安装的文件夹: mkdir ~/starship
  3. 安装星舰: ./install.sh --bin-dir /c/Users/<username>/starship/ --platform pc-windows-msvc
  4. 最后,将设置添加到.bashrc文件中:
# Starship configuration
export PATH=$PATH:"/c/Users/<username>/starship"
eval "$(starship init bash)"
  1. 运行: 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下运行它。

谢谢👍

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

vandrw picture vandrw  ·  3评论

tlb42 picture tlb42  ·  3评论

sirMerr picture sirMerr  ·  4评论

matchai picture matchai  ·  4评论

matchai picture matchai  ·  3评论