diff --git a/crates/moon/src/cli/build.rs b/crates/moon/src/cli/build.rs index 6f960066..f86de79e 100644 --- a/crates/moon/src/cli/build.rs +++ b/crates/moon/src/cli/build.rs @@ -161,19 +161,18 @@ fn run_build_internal( trace::open("trace.json").context("failed to open `trace.json`")?; } - let res; - if cmd.watch { + let res = if cmd.watch { let reg_cfg = RegistryConfig::load(); - res = watching( + watching( &moonc_opt, &moonbuild_opt, ®_cfg, &module, original_target_dir, - ); + ) } else { - res = entry::run_build(&moonc_opt, &moonbuild_opt, &module); - } + entry::run_build(&moonc_opt, &moonbuild_opt, &module) + }; if trace_flag { trace::close();