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

Panics if the current directory is not a valid cargo package #54

Closed
jyn514 opened this issue Sep 1, 2020 · 0 comments · Fixed by #67
Closed

Panics if the current directory is not a valid cargo package #54

jyn514 opened this issue Sep 1, 2020 · 0 comments · Fixed by #67

Comments

@jyn514
Copy link
Contributor

jyn514 commented Sep 1, 2020

$ cargo metadata --format-version 1
error: could not find `Cargo.toml` in `/home/joshua/src` or any parent directory
$ cargo deadlinks
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("EOF while parsing a value", line: 1, column: 0)', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Ideally it would pass through the error from cargo, but failing that it should at least say something like 'not a valid cargo package'.

Note that there's no inherent reason this needs to be fatal, since if you pass --dir it works fine. So maybe the error should say 'error: either pass --dir or run this in a valid cargo package'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant