diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-18 19:22:04 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-18 19:22:04 +0800 |
| commit | 665693ccf2f6c77a261b0f34c8fab7bf9e26d6c0 (patch) | |
| tree | 0a29b6b08e8659d9fb5cbc45b6a1973df391f15d /src/main.rs | |
| parent | b4a40e3fedb438570770a224b890ea24f6e660a9 (diff) | |
| download | aichat-665693ccf2f6c77a261b0f34c8fab7bf9e26d6c0.tar.gz | |
refactor: non-zero exit code when model call fails (#518)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 3 |
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(()) } |
