Skip to content

Commit f58d7ff

Browse files
authored
cli: fix GLIBC version requirement hardcoded in error message (microsoft#202605)
Fixes microsoft#202082
1 parent 7b3a15c commit f58d7ff

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cli/src/util/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ pub enum CodeError {
471471

472472
#[error("platform not currently supported: {0}")]
473473
UnsupportedPlatform(String),
474-
#[error("This machine not meet {name}'s prerequisites, expected either...: {bullets}")]
474+
#[error("This machine does not meet {name}'s prerequisites, expected either...: {bullets}")]
475475
PrerequisitesFailed { name: &'static str, bullets: String },
476476
#[error("failed to spawn process: {0:?}")]
477477
ProcessSpawnFailed(std::io::Error),

cli/src/util/prereqs.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ async fn check_glibc_version() -> Result<(), String> {
141141
Ok(())
142142
} else {
143143
Err(format!(
144-
"find GLIBC >= 2.17 (but found {} instead) for GNU environments",
145-
v
144+
"find GLIBC >= {} (but found {} instead) for GNU environments",
145+
*MIN_LDD_VERSION, v
146146
))
147147
};
148148
}
@@ -201,7 +201,8 @@ fn check_for_sufficient_glibcxx_versions(contents: Vec<u8>) -> Result<(), String
201201

202202
if !all_versions.iter().any(|v| &*MIN_CXX_VERSION >= v) {
203203
return Err(format!(
204-
"find GLIBCXX >= 3.4.18 (but found {} instead) for GNU environments",
204+
"find GLIBCXX >= {} (but found {} instead) for GNU environments",
205+
*MIN_CXX_VERSION,
205206
all_versions
206207
.iter()
207208
.map(String::from)

0 commit comments

Comments
 (0)