diff --git a/crates/fluvio-version-manager/src/common/version_directory.rs b/crates/fluvio-version-manager/src/common/version_directory.rs index 2869ad07e6..a392528428 100644 --- a/crates/fluvio-version-manager/src/common/version_directory.rs +++ b/crates/fluvio-version-manager/src/common/version_directory.rs @@ -1,4 +1,8 @@ use std::fs::{read_dir, copy, create_dir_all}; + +#[cfg(target_os = "macos")] +use std::fs::remove_file; + use std::path::PathBuf; use anyhow::Result; @@ -74,6 +78,18 @@ impl VersionDirectory { ))?; let target_path = fluvio_bin_dir.join(filename); + //remove for macos to sync w/ downloaded bin restrictions + #[cfg(target_os = "macos")] + if let Err(err) = remove_file(&target_path) { + use tracing::debug; + match err.kind() { + std::io::ErrorKind::NotFound => {} + _ => { + debug!("ioerr: {}", err); + } + } + } + copy(entry, &target_path)?; tracing::info!(?target_path, "Copied binary"); }