Skip to content

Commit d398baf

Browse files
committed
fix: unblock cross-platform release builds
1 parent d404275 commit d398baf

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

src/server/runtime.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ impl ServerRuntime {
9292
}
9393
}
9494

95-
pub(super) fn spawn_main_accept_loop(&self, listener: Listener) -> tokio::task::JoinHandle<()> {
95+
pub(super) fn spawn_main_accept_loop(
96+
&self,
97+
mut listener: Listener,
98+
) -> tokio::task::JoinHandle<()> {
9699
let runtime = self.clone();
97100
tokio::spawn(async move {
98101
loop {
@@ -111,7 +114,7 @@ impl ServerRuntime {
111114

112115
pub(super) fn spawn_debug_accept_loop(
113116
&self,
114-
listener: Listener,
117+
mut listener: Listener,
115118
server_start_time: Instant,
116119
) -> tokio::task::JoinHandle<()> {
117120
let runtime = self.clone();

src/setup_hints.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
//! State is persisted in `~/.jcode/setup_hints.json`.
99
1010
use crate::storage;
11+
#[cfg(target_os = "macos")]
12+
use anyhow::Context;
1113
use anyhow::Result;
1214
use serde::{Deserialize, Serialize};
1315
#[cfg(any(windows, target_os = "macos"))]
@@ -32,7 +34,8 @@ use macos_terminal::{
3234
};
3335
#[cfg(windows)]
3436
use windows_setup::{
35-
create_windows_desktop_shortcut, maybe_show_windows_setup_hints, run_setup_hotkey_windows,
37+
create_windows_desktop_shortcut, find_alacritty_path, maybe_show_windows_setup_hints,
38+
run_setup_hotkey_windows,
3639
};
3740

3841
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
@@ -466,7 +469,7 @@ fn macos_guided_ghostty_message(current_terminal: MacTerminalKind) -> String {
466469

467470
#[cfg(target_os = "macos")]
468471
fn nudge_macos_ghostty(state: &mut SetupHintsState) -> Option<String> {
469-
let terminal = detect_macos_terminal();
472+
let terminal = effective_macos_terminal();
470473
let using_ghostty = terminal == MacTerminalKind::Ghostty;
471474
let ghostty_installed = is_ghostty_installed();
472475

src/setup_hints/windows_setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn is_winget_available() -> bool {
3535
.unwrap_or(false)
3636
}
3737

38-
fn find_alacritty_path() -> Option<String> {
38+
pub(super) fn find_alacritty_path() -> Option<String> {
3939
let candidates = [
4040
r"C:\Program Files\Alacritty\alacritty.exe",
4141
r"C:\Program Files (x86)\Alacritty\alacritty.exe",

0 commit comments

Comments
 (0)