Skip to content

Commit

Permalink
fix: Stuck building when not watching
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoh committed May 29, 2024
1 parent 81347fc commit 5e8c770
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ async fn main() -> miette::Result<()> {
loop {
let building = tokio::spawn(build(watch, visualise_dag));
match building.await {
Ok(_) => {}
Ok(_) => {
if !watch {
break;
}
}
Err(err) => {
error!("Building failed: {:#?}", err);
info!("Retrying in 5 seconds … ");
Expand Down Expand Up @@ -166,7 +170,11 @@ async fn main() -> miette::Result<()> {
loop {
let building = tokio::spawn(build(watch, visualise_dag));
match building.await {
Ok(_) => {}
Ok(_) => {
if !watch {
break;
}
}
Err(err) => {
error!("Building failed: {:#?}", err);
info!("Retrying in 5 seconds … ");
Expand Down

0 comments on commit 5e8c770

Please sign in to comment.