Skip to content

Commit e759603

Browse files
committed
Consistently use eprintln inside the build system
1 parent e825497 commit e759603

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

build_system/prepare.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ impl GitRepo {
122122
if download_dir.exists() {
123123
let actual_hash = format!("{:016x}", hash_dir(&download_dir));
124124
if actual_hash == self.content_hash {
125-
println!("[FRESH] {}", download_dir.display());
125+
eprintln!("[FRESH] {}", download_dir.display());
126126
return;
127127
} else {
128-
println!(
128+
eprintln!(
129129
"Mismatched content hash for {download_dir}: {actual_hash} != {content_hash}. Downloading again.",
130130
download_dir = download_dir.display(),
131131
content_hash = self.content_hash,
@@ -150,7 +150,7 @@ impl GitRepo {
150150

151151
let actual_hash = format!("{:016x}", hash_dir(&download_dir));
152152
if actual_hash != self.content_hash {
153-
println!(
153+
eprintln!(
154154
"Download of {download_dir} failed with mismatched content hash: {actual_hash} != {content_hash}",
155155
download_dir = download_dir.display(),
156156
content_hash = self.content_hash,

build_system/utils.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Compiler {
4747
self.runner = vec!["wine".to_owned()];
4848
}
4949
_ => {
50-
println!("Unknown non-native platform");
50+
eprintln!("Unknown non-native platform");
5151
}
5252
}
5353
}
@@ -209,14 +209,14 @@ pub(crate) fn spawn_and_wait(mut cmd: Command) {
209209
pub(crate) fn retry_spawn_and_wait(tries: u64, mut cmd: Command) {
210210
for i in 1..tries + 1 {
211211
if i != 1 {
212-
println!("Command failed. Attempt {i}/{tries}:");
212+
eprintln!("Command failed. Attempt {i}/{tries}:");
213213
}
214214
if cmd.spawn().unwrap().wait().unwrap().success() {
215215
return;
216216
}
217217
std::thread::sleep(std::time::Duration::from_secs(i * 5));
218218
}
219-
println!("The command has failed after {tries} attempts.");
219+
eprintln!("The command has failed after {tries} attempts.");
220220
process::exit(1);
221221
}
222222

0 commit comments

Comments
 (0)