runJupyterCommand :: FilePath -> [String] -> IO String
runJupyterCommand jupyterPath args = readProcess jupyterPath args "" `catch` handler
  where
    handler :: IOException -> IO String
    handler _ =
      installFailed $
        concat
          [ "Could not run '"
          , jupyterPath
          , " "
          , unwords args
          , "'. "
          , "Please make sure Jupyter is installed and functional."
          ]

-- | Is this Jupyter version supported?
runJupyterCommand :: FilePath -> [String] -> IO String
runJupyterCommand jupyterPath args = readProcess jupyterPath args "" `catch` handler
  where
    handler :: IOException -> IO String
    handler _ =
      installFailed $
        concat
          [ "Could not run '"
          , jupyterPath
          , " "
          , unwords args
          , "'. "
          , "Please make sure Jupyter is installed and functional."
          ]

-- | Is this Jupyter version supported?
runJupyterCommand jupyterPath args = readProcess jupyterPath args "" `catch` handler
  where
    handler :: IOException -> IO String
    handler _ =
      installFailed $
        concat
          [ "Could not run '"
          , jupyterPath
          , " "
          , unwords args
          , "'. "
          , "Please make sure Jupyter is installed and functional."
          ]

-- | Is this Jupyter version supported?