print warnings and errors to stderr
This commit is contained in:
@@ -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}"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user