From 9b04efb5e46ed7e85759c7fd0370f8b181df5a80 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Sat, 9 Nov 2024 03:38:01 -0800 Subject: [PATCH] Fix openFileExplorerFolderPortable on macOS --- .../src/Test/Sandwich/Formatters/TerminalUI/CrossPlatform.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sandwich/src/Test/Sandwich/Formatters/TerminalUI/CrossPlatform.hs b/sandwich/src/Test/Sandwich/Formatters/TerminalUI/CrossPlatform.hs index 106a5050..cbd4bcfc 100644 --- a/sandwich/src/Test/Sandwich/Formatters/TerminalUI/CrossPlatform.hs +++ b/sandwich/src/Test/Sandwich/Formatters/TerminalUI/CrossPlatform.hs @@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE QuasiQuotes #-} module Test.Sandwich.Formatters.TerminalUI.CrossPlatform ( openFileExplorerFolderPortable @@ -19,6 +18,10 @@ openFileExplorerFolderPortable folder = do findExecutable "explorer.exe" >>= \case Just p -> void $ readCreateProcessWithExitCode (proc p [folder]) "" Nothing -> return () +#elif darwin_HOST_OS +openFileExplorerFolderPortable :: String -> IO () +openFileExplorerFolderPortable folder = + void $ readCreateProcessWithExitCode (proc "open" [folder]) "" #else openFileExplorerFolderPortable :: String -> IO () openFileExplorerFolderPortable folder =