Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo test panics when given specific <spec> with -p #9041

Closed
barafael opened this issue Jan 3, 2021 · 0 comments · Fixed by #9188
Closed

cargo test panics when given specific <spec> with -p #9041

barafael opened this issue Jan 3, 2021 · 0 comments · Fixed by #9188
Labels
A-cli Area: Command-line interface, option parsing, etc. C-bug Category: bug

Comments

@barafael
Copy link

barafael commented Jan 3, 2021

Problem

cargo test panics when the -p spec is malformed.

Steps

  1. clone https://github.com/barafael/smbus-slave-state-machine
  2. run cargo test -p /home/ra/smbus-slave-state-machine-rs#smbus-slave-state-machine:0.1.0
  3. run cargo test -p file:///home/ra/smbus-slave-state-machine-rs#smbus-slave-state-machine:0.1.0

Possible Solution(s)

This is the line that panics:
https://docs.rs/vkcargo/0.45.1/src/cargo/core/package_id_spec.rs.html#234

Notes
I am not sure this is a problem, but decided to report anyway because I think unwrap on a None value shouldn't happen.

Output of cargo version:
cargo 1.50.0-nightly (75d5d8c 2020-12-22)
cargo 1.48.0 (65cbdd2 2020-10-14)
nightly-x86_64-unknown-linux-gnu

@barafael barafael added the C-bug Category: bug label Jan 3, 2021
@ehuss ehuss added the A-cli Area: Command-line interface, option parsing, etc. label Jan 7, 2021
@bors bors closed this as completed in 0f3f47e Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command-line interface, option parsing, etc. C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants