Skip to content

Commit 25e920e

Browse files
authored
fix(cli): wait for dev command to exit with --no-watch, closes #14284 (#14298)
1 parent a279485 commit 25e920e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:bug
3+
"@tauri-apps/cli": patch:bug
4+
---
5+
6+
Wait for dev server to exit before exiting the CLI when the app is closed on `tauri dev --no-watch`.

crates/tauri-cli/src/interface/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ impl Interface for Rust {
215215
if options.no_watch {
216216
let (tx, rx) = sync_channel(1);
217217
self.run_dev(options, run_args, move |status, reason| {
218+
on_exit(status, reason);
218219
tx.send(()).unwrap();
219-
on_exit(status, reason)
220220
})?;
221221

222222
rx.recv().unwrap();

0 commit comments

Comments
 (0)