mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 04:00:02 +00:00
Run "Install binaries" step in block_in_place
mode
Since they execute a lot of blocking fs operations. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
cc8144e06d
commit
a35db557ea
1 changed files with 23 additions and 17 deletions
|
@ -12,7 +12,11 @@ use log::{debug, error, info, warn, LevelFilter};
|
|||
use miette::{miette, IntoDiagnostic, Result, WrapErr};
|
||||
use simplelog::{ColorChoice, ConfigBuilder, TermLogger, TerminalMode};
|
||||
use tempfile::TempDir;
|
||||
use tokio::{process::Command, runtime::Runtime, task::JoinError};
|
||||
use tokio::{
|
||||
process::Command,
|
||||
runtime::Runtime,
|
||||
task::{block_in_place, JoinError},
|
||||
};
|
||||
|
||||
use cargo_binstall::{
|
||||
bins,
|
||||
|
@ -441,6 +445,7 @@ async fn install_from_package(
|
|||
uithread.confirm().await?;
|
||||
|
||||
info!("Installing binaries...");
|
||||
block_in_place(|| {
|
||||
for file in &bin_files {
|
||||
file.install_bin()?;
|
||||
}
|
||||
|
@ -461,6 +466,7 @@ async fn install_from_package(
|
|||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
async fn install_from_source(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue