summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-18 19:22:04 +0800
committerGitHub <noreply@github.com>2024-05-18 19:22:04 +0800
commit665693ccf2f6c77a261b0f34c8fab7bf9e26d6c0 (patch)
tree0a29b6b08e8659d9fb5cbc45b6a1973df391f15d
parentb4a40e3fedb438570770a224b890ea24f6e660a9 (diff)
downloadaichat-665693ccf2f6c77a261b0f34c8fab7bf9e26d6c0.tar.gz
refactor: non-zero exit code when model call fails (#518)
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 895617d..ca4b298 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -131,7 +131,8 @@ async fn main() -> Result<()> {
true => start_interactive(&config).await,
} {
let highlight = stderr().is_terminal() && config.read().highlight;
- render_error(err, highlight)
+ render_error(err, highlight);
+ std::process::exit(1);
}
Ok(())
}