Implement zed --wait

This commit is contained in:
Antonio Scandurra 2022-04-20 12:54:34 +02:00
parent b013b1ba5d
commit f7055c2acc
6 changed files with 132 additions and 44 deletions

View file

@ -34,11 +34,12 @@ fn main() -> Result<()> {
.into_iter()
.map(|path| fs::canonicalize(path).map_err(|error| anyhow!(error)))
.collect::<Result<Vec<PathBuf>>>()?,
wait: false,
wait: args.wait,
})?;
while let Ok(response) = rx.recv() {
match response {
CliResponse::Ping => {}
CliResponse::Stdout { message } => println!("{message}"),
CliResponse::Stderr { message } => eprintln!("{message}"),
CliResponse::Exit { status } => std::process::exit(status),