diff --git a/src/install.rs b/src/install.rs index 4b550ec..91ff8f1 100644 --- a/src/install.rs +++ b/src/install.rs @@ -73,7 +73,10 @@ impl<'a> Step<'a> { match self { Self::DownloadFile { res, file } => { if file.exists() { - println!("File {file} already downloaded."); + println!( + "File {file} already downloaded.", + file = file.to_str().unwrap_or("") + ); } else { println!( "Downloading file {file} from {res:?}...", @@ -147,6 +150,11 @@ impl<'a> Step<'a> { } } Self::ExtractFile { file, dest } => { + println!( + "Extracting {file} to {dest}...", + file = file.to_str().unwrap_or(""), + dest = dest.to_str().unwrap_or("") + ); const EXTRACT_FILE_ERROR_MSG: &'static str = "Extracting file failed."; mkdir_all(&dest).await.wrap_err(EXTRACT_FILE_ERROR_MSG)?; let dest = tokio::fs::canonicalize(&dest) @@ -166,6 +174,11 @@ impl<'a> Step<'a> { ensure!(status.success(), EXTRACT_FILE_ERROR_MSG); } Self::ExecuteCommand { file, args } => { + println!( + "Executing command `{file} {args}`...", + file = file.to_str().unwrap_or(""), + args = args.into_iter().map(|s| *s).collect::(), + ); const EXECUTE_COMMAND_ERROR_MSG: &'static str = "Executing command failed."; let status = tokio::process::Command::new(file.as_os_str()) .args(*args) @@ -178,6 +191,10 @@ impl<'a> Step<'a> { ensure!(status.success(), EXECUTE_COMMAND_ERROR_MSG); } Self::CreateShortcut { target, file } => { + println!( + "Creating shortcut to {target:?} at {file}...", + file = file.to_str().unwrap_or("") + ); const CREATE_SHORTCUT_ERROR_MSG: &'static str = "Creating shortcut failed."; mkdir_all( file.parent().ok_or_else(|| {