Consistently use eprintln inside the build system
This commit is contained in:
parent
e825497b7d
commit
e759603da1
@ -122,10 +122,10 @@ pub(crate) fn fetch(&self, dirs: &Dirs) {
|
||||
if download_dir.exists() {
|
||||
let actual_hash = format!("{:016x}", hash_dir(&download_dir));
|
||||
if actual_hash == self.content_hash {
|
||||
println!("[FRESH] {}", download_dir.display());
|
||||
eprintln!("[FRESH] {}", download_dir.display());
|
||||
return;
|
||||
} else {
|
||||
println!(
|
||||
eprintln!(
|
||||
"Mismatched content hash for {download_dir}: {actual_hash} != {content_hash}. Downloading again.",
|
||||
download_dir = download_dir.display(),
|
||||
content_hash = self.content_hash,
|
||||
@ -150,7 +150,7 @@ pub(crate) fn fetch(&self, dirs: &Dirs) {
|
||||
|
||||
let actual_hash = format!("{:016x}", hash_dir(&download_dir));
|
||||
if actual_hash != self.content_hash {
|
||||
println!(
|
||||
eprintln!(
|
||||
"Download of {download_dir} failed with mismatched content hash: {actual_hash} != {content_hash}",
|
||||
download_dir = download_dir.display(),
|
||||
content_hash = self.content_hash,
|
||||
|
@ -47,7 +47,7 @@ pub(crate) fn set_cross_linker_and_runner(&mut self) {
|
||||
self.runner = vec!["wine".to_owned()];
|
||||
}
|
||||
_ => {
|
||||
println!("Unknown non-native platform");
|
||||
eprintln!("Unknown non-native platform");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,14 +209,14 @@ pub(crate) fn spawn_and_wait(mut cmd: Command) {
|
||||
pub(crate) fn retry_spawn_and_wait(tries: u64, mut cmd: Command) {
|
||||
for i in 1..tries + 1 {
|
||||
if i != 1 {
|
||||
println!("Command failed. Attempt {i}/{tries}:");
|
||||
eprintln!("Command failed. Attempt {i}/{tries}:");
|
||||
}
|
||||
if cmd.spawn().unwrap().wait().unwrap().success() {
|
||||
return;
|
||||
}
|
||||
std::thread::sleep(std::time::Duration::from_secs(i * 5));
|
||||
}
|
||||
println!("The command has failed after {tries} attempts.");
|
||||
eprintln!("The command has failed after {tries} attempts.");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user