Skip to content

Commit 4320fdd

Browse files
committed
fix: Update plot opening method for macOS support
1 parent 154edc2 commit 4320fdd

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/DataFrame/Display/Web/Plot.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,10 @@ showInDefaultBrowser (HtmlPlot p) = do
10621062
putStr "Saving plot to: "
10631063
putStrLn fullPath
10641064
T.writeFile fullPath p
1065-
if operatingSystem == "mingw32"
1066-
then openFileSilently "start" fullPath
1067-
else openFileSilently "xdg-open" fullPath
1065+
case operatingSystem of
1066+
"mingw32" -> openFileSilently "start" fullPath
1067+
"darwin" -> openFileSilently "open" fullPath
1068+
_ -> openFileSilently "xdg-open" fullPath
10681069
pure ()
10691070

10701071
openFileSilently :: FilePath -> FilePath -> IO ()

0 commit comments

Comments
 (0)