1
Fork 0

Make RUSTC_OVERRIDE_VERSION_STRING overwrite the rendered version output, too

This commit is contained in:
Oli Scherer 2024-04-25 15:29:51 +00:00
parent cbab16feaf
commit 92f263b792
2 changed files with 10 additions and 1 deletions

View file

@ -909,6 +909,15 @@ pub fn version_at_macro_invocation(
) {
let verbose = matches.opt_present("verbose");
let mut version = version;
let mut release = release;
let tmp;
if let Ok(force_version) = std::env::var("RUSTC_OVERRIDE_VERSION_STRING") {
tmp = force_version;
version = &tmp;
release = &tmp;
}
safe_println!("{binary} {version}");
if verbose {