Fix get_install_path where cargo_home succeeds

The returned path must join with `"bin"`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-23 19:16:23 +10:00
parent 49f665d680
commit b4d2e9b99c
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -215,7 +215,7 @@ pub fn get_install_path<P: AsRef<Path>>(install_path: Option<P>) -> (Option<Arc<
if let Ok(p) = cargo_home() {
debug!("using ({}) as cargo home", p.display());
return (Some(p.into()), false);
return (Some(p.join("bin").into()), false);
}
// Local executable dir if no cargo is found