cli: fix GLIBC version requirement hardcoded in error message (#202605)

Fixes #202082
This commit is contained in:
Connor Peet
2024-01-16 11:34:18 -08:00
committed by GitHub
parent 7b3a15c679
commit f58d7ff83d
2 changed files with 5 additions and 4 deletions

View File

@@ -471,7 +471,7 @@ pub enum CodeError {
#[error("platform not currently supported: {0}")]
UnsupportedPlatform(String),
#[error("This machine not meet {name}'s prerequisites, expected either...: {bullets}")]
#[error("This machine does not meet {name}'s prerequisites, expected either...: {bullets}")]
PrerequisitesFailed { name: &'static str, bullets: String },
#[error("failed to spawn process: {0:?}")]
ProcessSpawnFailed(std::io::Error),

View File

@@ -141,8 +141,8 @@ async fn check_glibc_version() -> Result<(), String> {
Ok(())
} else {
Err(format!(
"find GLIBC >= 2.17 (but found {} instead) for GNU environments",
v
"find GLIBC >= {} (but found {} instead) for GNU environments",
*MIN_LDD_VERSION, v
))
};
}
@@ -201,7 +201,8 @@ fn check_for_sufficient_glibcxx_versions(contents: Vec<u8>) -> Result<(), String
if !all_versions.iter().any(|v| &*MIN_CXX_VERSION >= v) {
return Err(format!(
"find GLIBCXX >= 3.4.18 (but found {} instead) for GNU environments",
"find GLIBCXX >= {} (but found {} instead) for GNU environments",
*MIN_CXX_VERSION,
all_versions
.iter()
.map(String::from)