Skip to content

Commit

Permalink
Merge pull request #1637 from danielthegray/use-USAGE-error-exit-code
Browse files Browse the repository at this point in the history
imp: Add exitcode::USAGE exit code as suggested in #1327
  • Loading branch information
pksunkara authored Jan 30, 2020
2 parents f3683a9 + a1445b0 commit e1ae505
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ maintenance = {status = "actively-developed"}

[dependencies]
bitflags = "1.2"
exitcode = "1.1.2"
unicode-width = "0.1.4"
textwrap = "0.11"
indexmap = "1.0.1"
Expand Down
4 changes: 2 additions & 2 deletions src/build/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ impl<'b> App<'b> {
i.lock().read_line(&mut s).unwrap();
}
drop(e);
process::exit(1);
process::exit(exitcode::USAGE);
}

e.exit()
Expand Down Expand Up @@ -1268,7 +1268,7 @@ impl<'b> App<'b> {
}
drop(self);
drop(e);
process::exit(1);
process::exit(exitcode::USAGE);
}

drop(self);
Expand Down

0 comments on commit e1ae505

Please # to comment.