mirror of
https://github.com/Llewellynvdm/exa.git
synced 2025-01-15 01:23:43 +00:00
--help and --version should have exit code 0
This makes it possible to use them in scripts. Also, I couldn’t find any other program returned a different error code! So it’s being changed to 0. Fixed #180.
This commit is contained in:
parent
e10c4b3eb9
commit
510d2f7a76
@ -55,8 +55,11 @@ impl Misfire {
|
|||||||
|
|
||||||
/// The OS return code this misfire should signify.
|
/// The OS return code this misfire should signify.
|
||||||
pub fn error_code(&self) -> i32 {
|
pub fn error_code(&self) -> i32 {
|
||||||
if let Misfire::Help(_) = *self { 2 }
|
match *self {
|
||||||
else { 3 }
|
Misfire::Help(_) => 0,
|
||||||
|
Misfire::Version => 0,
|
||||||
|
_ => 3,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The Misfire that happens when an option gets given the wrong
|
/// The Misfire that happens when an option gets given the wrong
|
||||||
|
Loading…
Reference in New Issue
Block a user