Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/exit-with-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-runtime-wry': 'patch:bug'
Comment thread
Legend-Master marked this conversation as resolved.
Resolved
---

Transfer the exit code from the `window.app_handle().exit(1)` call to the `run_return()` result instead of always returning 0.
2 changes: 1 addition & 1 deletion crates/tauri-runtime-wry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4304,7 +4304,7 @@ fn handle_event_loop<T: UserEvent>(
let should_prevent = matches!(recv, Ok(ExitRequestedEventAction::Prevent));

if !should_prevent {
*control_flow = ControlFlow::Exit;
*control_flow = ControlFlow::ExitWithCode(code);
}
}
Message::Window(id, WindowMessage::Close) => {
Expand Down