Skip to content

Commit

Permalink
Generalize OS detection. (#232)
Browse files Browse the repository at this point in the history
There are many Unix-like OSes that have xdg-open that are not Linux.
Rather than enumerating DragonflyBSD, FreeBSD, NetBSD, OpenBSD, etc.,
change this "Linux" target to "Unix and not Android and not MacOS".
  • Loading branch information
trombonehero authored Sep 5, 2024
1 parent 32717e0 commit 043a3a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plotly/src/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ impl Plot {
.expect("Invalid JSON structure - expected a top-level Object")
}

#[cfg(target_os = "linux")]
#[cfg(all(unix, not(target_os = "android"), not(target_os = "macos")))]
fn show_with_default_app(temp_path: &str) {
use std::process::Command;
Command::new("xdg-open")
Expand Down

0 comments on commit 043a3a7

Please # to comment.