-
Notifications
You must be signed in to change notification settings - Fork 16
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
Panic at unwrap if docs were built using CARGO_BUILD_TARGET #38
Comments
Not sure if taking But yes, the command should definitely handle an nonexistent directory more gracefully, and probably log out a message that recommends using the |
Judging by the docs [1] [2], just three:
(
I export it at the top of my |
Hmm. It's also possible to configure them by putting cargo config files within the project. If I'm reading the API docs and the associated source code correctly, the simplest solution would just to be to link against the (That should initialize Cargo's config resolution based on the current working directory and I can see the fallback chain for the aforementioned variables right in the source for EDIT: ...but I'm not seeing (Not that compilcated. Reminds me of using |
Thanks for the research! Yeah, you are right, in scripts and CI settings it's probably not that unusual to have the envvar exported. If the ways you describe cover the bulk of the cases, then that looks reasonable to implement. I'm very much against introducing |
Oh boy, I really do spend to little time maintaining this project 😓 . Just saw that I already implemented that in #33, though unreleased as of right now (see #25 for that). |
Ran into a similar issue recently,
It looks like
|
I would prefer not to handle this in deadlinks itself. I'd have to handle CARGO_BUILD_TARGET, .cargo/config, ~/.cargo/config, $CARGO_HOME ... I'd much rather get this info from cargo directly: rust-lang/cargo#8791 |
If
CARGO_BUILD_TARGET
(or any other method of specifying a non-default target) is set, the docs get placed intarget/<target>/doc/<package>
rather thantarget/doc/<package>
.The current
cargo install
able version of cargo-deadlinks (as of a few minutes ago) panics when it encounters this and you haven't manually specified--dir
.Instead, it should do two things:
CARGO_BUILD_TARGET
into account.The text was updated successfully, but these errors were encountered: