diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-15 13:17:36 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-15 13:17:36 +0800 |
| commit | f9d45175d3c0b04dfa78296d642ad4fd95e44a45 (patch) | |
| tree | 59ee34e67fe3be8fcfab97bd77524dc150515aa6 /src/main.rs | |
| parent | 5378033b343bb10b884c8f9435554ec9ddd8dd7c (diff) | |
| download | aichat-f9d45175d3c0b04dfa78296d642ad4fd95e44a45.tar.gz | |
fix: unexpect enter repl if have pipe-in but no text args (#512)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 2 |
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"); |
