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

Instead of printing an io::Error::display, print the the path that failed #7025

Closed
czipperz opened this issue Jun 10, 2019 · 1 comment · Fixed by #7116
Closed

Instead of printing an io::Error::display, print the the path that failed #7025

czipperz opened this issue Jun 10, 2019 · 1 comment · Fixed by #7116
Labels
C-bug Category: bug

Comments

@czipperz
Copy link

czipperz commented Jun 10, 2019

If you make a project and add the following to the Cargo.toml:

[workspace]
members = [""]

[dependencies]
x = { path = "x" }

You get the error message:

$ RUST_BACKTRACE=1 cargo test -q

Caused by:
  No such file or directory (os error 2)
@czipperz czipperz added the C-bug Category: bug label Jun 10, 2019
@czipperz
Copy link
Author

czipperz commented Jun 10, 2019

So it turns out passing -q removes the path from the error message (which I was doing above):

error: failed to read `/home/czipperz/test4/x/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

In any case it's different than the normal message (no workspace):

error: failed to load source for a dependency on `x`

Caused by:
  Unable to update /home/czipperz/test4/x

Caused by:
  failed to read `/home/czipperz/test4/x/Cargo.toml`

Caused by:
  No such file or directory (os error 2)

bors added a commit that referenced this issue Jul 10, 2019
Don't suppress error messages with `-q`

If we're printing an error, make sure we always print it regardless of
verbosity settings!

Closes #7025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant