]> git.proxmox.com Git - cargo.git/commit
Normalize `--path` to install bin outside current workspace
authorWeihang Lo <me@weihanglo.tw>
Thu, 27 Jan 2022 09:58:06 +0000 (17:58 +0800)
committerWeihang Lo <me@weihanglo.tw>
Thu, 27 Jan 2022 10:31:02 +0000 (18:31 +0800)
commit44f650f2606c0cff8d8cce64b309dff4bda6ed99
tree429410434dbf61cc6a47cf0253f0db5a36aecff1
parentd323ad672cf9f75ff9f68c83ff963010cde61e48
Normalize `--path` to install bin outside current workspace

For `Workspace::find_root`, `cargo_util::path::PathAncestors` won't do
path normalization while walking back the ancestors. The responsibility
lies in the caller. Thus, `cargo install` should normalize its `--path`
argument before passing in `SourceId::for_path` and `Workspace::new`.

`Config::reload_rooted_at` is not affected because cargo always starts
searching and merging configs from where it is invoked.
src/bin/cargo/commands/install.rs