print warnings and errors to stderr

This commit is contained in:
Dr. Matthias Ratajczak
2023-02-14 12:47:41 +01:00
parent 9d5d289e2b
commit 7ff9f6384d
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -235,7 +235,7 @@ impl Pacdef {
.context("filename is not valid UTF-8")?;
if !target.exists() {
println!("file {target_name} does not exist, skipping");
eprintln!("file {target_name} does not exist, skipping");
continue;
}
@@ -243,7 +243,7 @@ impl Pacdef {
link.push(target_name);
if link.exists() {
println!("group {target_name} already exists, skipping");
eprintln!("group {target_name} already exists, skipping");
} else {
symlink(target, link)?;
}
@@ -319,7 +319,7 @@ fn show_error(error: &anyhow::Error, backend: &dyn Backend) {
}
}
}
None => println!("WARNING: skipping backend '{section}': {error}"),
None => eprintln!("WARNING: skipping backend '{section}': {error}"),
}
}
+3 -3
View File
@@ -27,7 +27,7 @@ impl Group {
let path = file.path();
if config.warn_not_symlinks && !path.is_symlink() {
println!(
eprintln!(
"WARNING: group file {} is not a symlink",
path.to_string_lossy()
);
@@ -98,13 +98,13 @@ impl Group {
}
Err(e) => {
let err = e.root_cause();
println!("WARNING: could not process a section under group '{name}': {err}");
eprintln!("WARNING: could not process a section under group '{name}': {err}");
}
}
}
if sections.is_empty() {
println!("WARNING: no sections found in group '{name}'");
eprintln!("WARNING: no sections found in group '{name}'");
}
let path = path.into();