diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-10-07 09:47:03 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-10-07 11:10:30 +0000 |
| commit | e759603da1d281890cac241f244d2288c127b355 (patch) | |
| tree | 9db7b9e914064bb8d3d7ebf4296466d72bc9c6b7 | |
| parent | e825497b7dcd4ea2dfca284d7aac97848becf784 (diff) | |
| download | rust-e759603da1d281890cac241f244d2288c127b355.tar.gz rust-e759603da1d281890cac241f244d2288c127b355.zip | |
Consistently use eprintln inside the build system
| -rw-r--r-- | build_system/prepare.rs | 6 | ||||
| -rw-r--r-- | build_system/utils.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/build_system/prepare.rs b/build_system/prepare.rs index 165296cb4a9..16e7a4bafae 100644 --- a/build_system/prepare.rs +++ b/build_system/prepare.rs @@ -122,10 +122,10 @@ impl GitRepo { 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 @@ impl GitRepo { 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, diff --git a/build_system/utils.rs b/build_system/utils.rs index d50013d9b24..9f24c043a50 100644 --- a/build_system/utils.rs +++ b/build_system/utils.rs @@ -47,7 +47,7 @@ impl Compiler { 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); } |
