all: errors now print to stderr instead of stdout

This commit is contained in:
Valerie Wolfe 2024-07-12 10:46:25 -04:00
parent 00068f5e5d
commit 5bdeabbe76
4 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "env-share"
version = "0.0.1"
version = "0.0.2"
edition = "2021"
[profile.release]

View file

@ -1,18 +1,18 @@
use std::process::exit;
pub fn file_unset() {
println!("env-share: ENV_SHARE_FILE is unset");
eprintln!("env-share: ENV_SHARE_FILE is unset");
exit(1);
}
pub fn vars_unset() {
println!("env-share: ENV_SHARE_VARS is unset");
eprintln!("env-share: ENV_SHARE_VARS is unset");
exit(1);
}
pub fn write_fail(file: &String) {
println!("env-share: failed to write to '{file}'");
eprintln!("env-share: failed to write to '{file}'");
exit(2);
}

View file

@ -1,6 +1,6 @@
[package]
name = "mkwin"
version = "0.0.4"
version = "0.0.5"
edition = "2021"
[dependencies]

View file

@ -4,13 +4,13 @@ use std::process::exit;
/// no argument for target; code 1
pub fn missing_target() {
println!("mkwin: missing target");
eprintln!("mkwin: missing target");
exit(1);
}
/// failed to canonicalize target path; code 2
pub fn canonicalize_fail(target: String) {
println!("mkwin: failed to canonicalze '{target}'--does the file exist?");
eprintln!("mkwin: failed to canonicalze '{target}'--does the file exist?");
exit(2);
}