Closed CAD97 closed 7 months ago
This looks like binstall output. Can you repro this with cargo-binstall --roots {whatever your cargo dir is configured to} --no-confirm --version =0.1.10 --force --quiet cargo-docs-rs
?
warning: be sure to add
\\?\D:\.rust\cargo\bin
to your PATH to be able to run the installed binaries
I think this is from cargo-install.
Cargo-binstall output looks like this
INFO Cargo finished successfully
It's always <log_level> <msg>
QuickInstall is now providing cargo-docs-rs@0.1.10 so I can't easily reproduce with this crate again. However, I have previously verified that neither cargo install
nor cargo binstall
print the warning on their own, only when orchestrated through cargo install-update
. This is a message that cargo install
produces, but it doesn't without specific prompting.
I think I figured out what's going on, though: you're passing a normalized root, thus a root in UNC path format, and cargo install
doesn't do a normalized-prefix check, only a prefix check. Previously: https://github.com/rust-lang/cargo/issues/13378
Oh and for clarity, my $CARGO_HOME
is D:\.rust\cargo
, i.e. not in the canonicalized extended-length format. This is probably due to a path.canonicalize()
somewhere in cargo-install-update, when it really should only be doing CARGO_HOME.join("bin")
without any canonicalization.
Yeah, that was gonna be my guess as well – we run cargo-binstall --roots {cargo-dir} ...
or cargo install --root {cargo-dir} ...
, and cargo-dir
is canonicalised, which yields the \\?\
prefix.
I was gonna say I hadn't seen this warning before, even with
>echo %PATH% | tr ';' '\n' | grep cargo
D:\Users\nabijaczleweli\.cargo\bin
d:\Users\nabijaczleweli\.cargo\bin
but I just reproed it with cargo install --root \\?\D:\Users\nabijaczleweli\.cargo treesize
so maybe I just never noticed it or whatever.
@CAD97 can you try the current master
branch (at least 3cc63719ab83cf9760fd4e09cf72f9eb9136771a)?
Fix released in v13.4.0
Example:
The UNC-style path
\\?\D:\.rust\cargo\bin
is not on my PATH, butD:\.rust\cargo\bin
is. Cargo (andcargo binstall
) correctly is not displaying this warning itself; this warning is coming from thecargo install-update
wrapper.