mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-09 05:20:03 +00:00
Fix custom_install_path
detection
Installing to `CARGO_INSTALL_ROOT` or the local executable dir should be considered a custom installation path. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
7bdc720a9a
commit
79476e490b
2 changed files with 14 additions and 13 deletions
12
src/main.rs
12
src/main.rs
|
@ -241,13 +241,11 @@ async fn entry(jobserver_client: LazyJobserverClient) -> Result<()> {
|
|||
let desired_targets = get_desired_targets(&opts.targets);
|
||||
|
||||
// Compute install directory
|
||||
let custom_install_path = opts.install_path.is_some();
|
||||
let install_path: Arc<Path> = Arc::from(
|
||||
get_install_path(opts.install_path.as_deref()).ok_or_else(|| {
|
||||
error!("No viable install path found of specified, try `--install-path`");
|
||||
miette!("No install path found or specified")
|
||||
})?,
|
||||
);
|
||||
let (install_path, custom_install_path) = get_install_path(opts.install_path.as_deref());
|
||||
let install_path: Arc<Path> = Arc::from(install_path.ok_or_else(|| {
|
||||
error!("No viable install path found of specified, try `--install-path`");
|
||||
miette!("No install path found or specified")
|
||||
})?);
|
||||
debug!("Using install path: {}", install_path.display());
|
||||
|
||||
// Create a temporary directory for downloads etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue