summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-15 13:17:36 +0800
committerGitHub <noreply@github.com>2024-05-15 13:17:36 +0800
commitf9d45175d3c0b04dfa78296d642ad4fd95e44a45 (patch)
tree59ee34e67fe3be8fcfab97bd77524dc150515aa6
parent5378033b343bb10b884c8f9435554ec9ddd8dd7c (diff)
downloadaichat-f9d45175d3c0b04dfa78296d642ad4fd95e44a45.tar.gz
fix: unexpect enter repl if have pipe-in but no text args (#512)
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index a8ae389..25895d7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -35,6 +35,7 @@ use tokio::sync::oneshot;
async fn main() -> Result<()> {
let cli = Cli::parse();
let text = cli.text();
+ let text = aggregate_text(text)?;
let file = &cli.file;
let no_input = text.is_none() && file.is_empty();
let working_mode = if cli.serve.is_some() {
@@ -107,7 +108,6 @@ async fn main() -> Result<()> {
println!("{}", info);
return Ok(());
}
- let text = aggregate_text(text)?;
if cli.execute {
if no_input {
bail!("No input");