mirror of https://github.com/sharkdp/fd.git
Remove process::exit instance
This commit is contained in:
parent
53557ef471
commit
4815ee416e
|
@ -312,7 +312,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
eprintln!("[fd error]: {}", err);
|
eprintln!("[fd error]: {}", err);
|
||||||
process::exit(1);
|
process::exit(ExitCode::GeneralError.into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,10 +126,10 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<Options>) ->
|
||||||
let exit_code = receiver_thread.join().unwrap();
|
let exit_code = receiver_thread.join().unwrap();
|
||||||
|
|
||||||
if wants_to_quit.load(Ordering::Relaxed) {
|
if wants_to_quit.load(Ordering::Relaxed) {
|
||||||
process::exit(ExitCode::KilledBySigint.into());
|
Ok(ExitCode::KilledBySigint)
|
||||||
|
} else {
|
||||||
|
Ok(exit_code)
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(exit_code)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn spawn_receiver(
|
fn spawn_receiver(
|
||||||
|
|
Loading…
Reference in New Issue