From f9d45175d3c0b04dfa78296d642ad4fd95e44a45 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 15 May 2024 13:17:36 +0800 Subject: fix: unexpect enter repl if have pipe-in but no text args (#512) --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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"); -- cgit v1.2.3