Skip to content

Commit 1be7608

Browse files
committed
gate portal_test to linux so macos builds
1 parent 1adc1bd commit 1be7608

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src-tauri/src/bin/portal_test.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@
2424
//! Wayland hotkey path works end-to-end and the qol integration just needs
2525
//! to wrap this same flow.
2626
27-
use std::time::SystemTime;
27+
// This tool drives the Linux-only xdg-desktop-portal (via ashpd, a Linux-only
28+
// dep), so it's a no-op on other platforms rather than a build break.
29+
#[cfg(not(target_os = "linux"))]
30+
fn main() {
31+
eprintln!("portal_test is Linux-only (xdg-desktop-portal GlobalShortcuts).");
32+
}
2833

34+
#[cfg(target_os = "linux")]
2935
use ashpd::desktop::global_shortcuts::{GlobalShortcuts, NewShortcut};
36+
#[cfg(target_os = "linux")]
3037
use futures_util::StreamExt;
38+
#[cfg(target_os = "linux")]
39+
use std::time::SystemTime;
3140

41+
#[cfg(target_os = "linux")]
3242
const SHORTCUT_ID: &str = "qol-toggle";
3343

44+
#[cfg(target_os = "linux")]
3445
#[tokio::main]
3546
async fn main() -> ashpd::Result<()> {
3647
tracing_subscriber::fmt()

0 commit comments

Comments
 (0)