diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index 5a80e99466a3072f8b197eb0c2d5270fa9ac96d1..6a0350c5a1e61838b01489d7a452e4968b9f9295 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -72,6 +72,7 @@ actions!( ShowAll, ToggleFullScreen, Zoom, + TestPanic, ] ); @@ -83,6 +84,10 @@ pub fn init(cx: &mut AppContext) { #[cfg(target_os = "macos")] cx.on_action(|_: &ShowAll, cx| cx.unhide_other_apps()); cx.on_action(quit); + + if ReleaseChannel::global(cx) == ReleaseChannel::Dev { + cx.on_action(test_panic); + } } pub fn build_window_options(display_uuid: Option, cx: &mut AppContext) -> WindowOptions { @@ -472,6 +477,10 @@ fn about(_: &mut Workspace, _: &About, cx: &mut gpui::ViewContext) { .detach(); } +fn test_panic(_: &TestPanic, _: &mut AppContext) { + panic!("Ran the TestPanic action") +} + fn quit(_: &Quit, cx: &mut AppContext) { let should_confirm = WorkspaceSettings::get_global(cx).confirm_quit; cx.spawn(|mut cx| async move { diff --git a/script/bundle-linux b/script/bundle-linux index 25eb97093bb2ef71cbbde7a82bcf63b82918cadc..9d14d43c40724f2d88ed2256c9232dfd1872ecaf 100755 --- a/script/bundle-linux +++ b/script/bundle-linux @@ -43,8 +43,8 @@ cargo build --release --target "${target_triple}" --package zed --package cli # Strip the binary of all debug symbols # Later, we probably want to do something like this: https://github.com/GabrielMajeri/separate-symbols -strip "target/${target_triple}/release/zed" -strip "target/${target_triple}/release/cli" +strip --strip-debug "target/${target_triple}/release/zed" +strip --strip-debug "target/${target_triple}/release/cli" suffix="" if [ "$channel" != "stable" ]; then