Skip to content

Commit 72daee3

Browse files
committed
ensure installed version (via native package manager) matches desired version.
1 parent 25cf611 commit 72daee3

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

  • clang-installer/src/downloader/native_packages

clang-installer/src/downloader/native_packages/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ pub async fn try_install_package(
9191
let path =
9292
tool.get_exe_path(&RequestedVersion::Requirement(version_req.clone()))?;
9393
let version = tool.capture_version(&path)?;
94-
log::info!(
95-
"Found {tool} version matching {version_req} installed via {mgr} package manager."
96-
);
97-
return Ok(Some(ClangVersion { version, path }));
94+
if version_req.matches(&version) {
95+
log::info!(
96+
"Found {tool} version matching {version_req} installed via {mgr} package manager."
97+
);
98+
return Ok(Some(ClangVersion { version, path }));
99+
}
98100
} else {
99101
log::info!(
100102
"{mgr} package manager does not have a version of {tool} matching {version_req} installed."

0 commit comments

Comments
 (0)