Add standard warning function in tee

This commit is contained in:
pabzdzdzwiagief 2013-12-28 01:49:44 +01:00
parent 2d5180be07
commit af4092124b

View file

@ -25,7 +25,7 @@ static VERSION: &'static str = "1.0.0";
fn main() {
match options(args()).and_then(exec) {
Err(message) => {
error!("{}: {}", args()[0], message);
warn(message);
set_exit_status(1)
},
Ok(status) => set_exit_status(status)
@ -107,3 +107,7 @@ fn tee(options: Options) -> Result<int, ~str> {
0
})).map_err(|err| err.desc.to_owned())
}
fn warn(message: &str) {
error!("{}: {}", args()[0], message);
}