-- |

module Test.Sandwich.Formatters.TerminalUI.CrossPlatform (
  openFileExplorerFolderPortable
  ) where

import Control.Monad
import System.Process

-- | TODO: report exceptions here
openFileExplorerFolderPortable :: String -> IO ()
openFileExplorerFolderPortable String
folder = do
  IO (ExitCode, String, String) -> IO ()
forall (f :: * -> *) a. Functor f => f a -> f ()
void (IO (ExitCode, String, String) -> IO ())
-> IO (ExitCode, String, String) -> IO ()
forall a b. (a -> b) -> a -> b
$ CreateProcess -> String -> IO (ExitCode, String, String)
readCreateProcessWithExitCode (String -> [String] -> CreateProcess
proc String
"xdg-open" [String
folder]) String
""