fix: unexpect enter repl if have pipe-in but no text args (#512)

pull/518/head
sigoden 1 month ago committed by GitHub
parent 5378033b34
commit f9d45175d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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");

Loading…
Cancel
Save