Install: add a bindir flag or similar #10748
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-install
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
Currently,
"bin"
is always suffixed onto theroot
, meaning it's really hard when trying to deal with installing binaries from a project into a separate directly, that's not specificallybin
(for example, if I have a video related tool, I might install it into$root/bin-video
, and$root/bin-audio
for an audio related tool, and so on).I currently have to do something like
and that's not very desirable and very fragile.
I tried looking to see if a similar issue existed, but could not find anything yet.
Proposed Solution
One solution would be to add a flag to
cargo install
that would take a relative path to--root
, and if not provided, default to"bin"
, and that would be used in the below code locations instead of the current contant strings.cargo/src/cargo/ops/cargo_install.rs
Line 78 in 6b8e192
cargo/src/cargo/ops/cargo_install.rs
Line 567 in 6b8e192
cargo/src/cargo/ops/cargo_install.rs
Line 279 in 6b8e192
So, something like
--root /mycustomprefix --bindir bin-video
would install the executables into/mycustomprefix/bin-video
instead of/mycustomprefix/bin
Notes
No response
The text was updated successfully, but these errors were encountered: