Skip to content

Commit 043a3a7

Browse files
authored
Generalize OS detection. (#232)
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".
1 parent 32717e0 commit 043a3a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plotly/src/plot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ impl Plot {
464464
.expect("Invalid JSON structure - expected a top-level Object")
465465
}
466466

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

0 commit comments

Comments
 (0)