Exits with exec syscall "errno" (if available)

This commit is contained in:
Samuel FORESTIER 2022-06-03 20:00:05 +02:00
parent b4c447968b
commit 82313ffc44

@ -82,5 +82,10 @@ fn main() {
.env_remove(DEFAULT_WRITE_STYLE_ENV)
.exec();
error!("Error while executing {:?}: {}", args.arguments, error);
process::exit(1);
process::exit(if let Some(raw_os_error) = error.raw_os_error() {
raw_os_error
} else {
1
});
}