diff --git a/src/commands/build/watch/mod.rs b/src/commands/build/watch/mod.rs index 0f1aeef06..01edd5c27 100644 --- a/src/commands/build/watch/mod.rs +++ b/src/commands/build/watch/mod.rs @@ -45,7 +45,10 @@ pub fn watch_and_build( tx.send(()).expect("--watch change message failed to send"); } } - Err(_) => message::user_error("Something went wrong while watching."), + Err(e) => { + log::debug!("{:?}", e); + message::user_error("Something went wrong while watching.") + } } } }); diff --git a/src/commands/dev/gcs/watch.rs b/src/commands/dev/gcs/watch.rs index 428038930..533584d96 100644 --- a/src/commands/dev/gcs/watch.rs +++ b/src/commands/dev/gcs/watch.rs @@ -21,7 +21,6 @@ pub fn watch_for_changes( while let Ok(_) = receiver.recv() { let user = user.clone(); let target = target.clone(); - commands::build(&target)?; // acquire the lock so incoming requests are halted // until the new script is ready for them diff --git a/src/commands/preview/mod.rs b/src/commands/preview/mod.rs index f0d401edd..27058c40a 100644 --- a/src/commands/preview/mod.rs +++ b/src/commands/preview/mod.rs @@ -169,9 +169,7 @@ fn watch_for_changes( let (tx, rx) = channel(); commands::watch_and_build(&target, Some(tx))?; - while let Ok(_e) = rx.recv() { - commands::build(&target)?; - + while let Ok(_) = rx.recv() { if let Ok(new_id) = upload(&mut target, user, sites_preview, verbose) { let script_id = format!("{}", new_id);