matchai / spacefish

🚀🐟 The fish shell prompt for astronauts
https://spacefish.matchai.dev
MIT License
960 stars 78 forks source link

Package: Support cargo package manager (Rust) #143

Closed matchai closed 5 years ago

matchai commented 5 years ago

🐟 spacefish-bot — Pull request copied from: https://github.com/denysdovhan/spaceship-prompt/pull/617.

Description

Make package section support cargo package manager.

If there is a missing field version in Cargo.toml, the following error occur:

error: failed to parse manifest at `/path/to/Cargo.toml`

Caused by:
missing field `version` for key `package`

Currently, we use cargo pkgid.

$ cargo pkgid
> file:///path/to/tokio-rs/tokio#0.1.14

But it depends on cargo.lock. So we need handle the following error:

error: a Cargo.lock must exist for this command

If you work on a rust package, you almost have a cargo.lock in package root directory except you just only clone a package without any work.

Screenshot

image

matchai commented 5 years ago

:tada: This issue has been resolved in version 2.4.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: