fix: returns 0 exit code on error (#1322)

This commit is contained in:
Nitish Kumar 2022-09-18 18:24:45 +05:30 committed by GitHub
parent ddf8c69253
commit d1566861dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,8 +112,7 @@ fn main() -> Result<()> {
asyncgit::register_tracing_logging();
if !valid_path(&cliargs.repo_path) {
eprintln!("invalid path\nplease run gitui inside of a non-bare git repository");
return Ok(());
bail!("invalid path\nplease run gitui inside of a non-bare git repository");
}
let key_config = KeyConfig::init()