stack-1.6.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

System.Process.Run

Description

Run sub-processes.

Synopsis

Documentation

runCmd Source #

Arguments

:: forall (m :: * -> *). (MonadLogger m, MonadUnliftIO m) 
=> Cmd 
-> Maybe Text

optional additional error message

-> m () 

Run the given command in the given directory, inheriting stdout and stderr.

If it exits with anything but success, prints an error and then calls exitWith to exit the program.

runCmd' Source #

Arguments

:: forall (m :: * -> *). (MonadLogger m, MonadUnliftIO m) 
=> (CreateProcess -> CreateProcess) 
-> Cmd 
-> Maybe Text

optional additional error message

-> m () 

callProcess :: (MonadIO m, MonadLogger m) => Cmd -> m () Source #

Like callProcess, but takes an optional working directory and environment override, and throws ProcessExitedUnsuccessfully if the process exits unsuccessfully and a ReadProcessException if the executable is not found.

Inherits stdout and stderr.

callProcess' :: (MonadIO m, MonadLogger m) => (CreateProcess -> CreateProcess) -> Cmd -> m () Source #

Like callProcess, but takes an optional working directory and environment override, and throws ProcessExitedUnsuccessfully if the process exits unsuccessfully and a ReadProcessException if the executable is not found.

Inherits stdout and stderr.

createProcess' :: (MonadIO m, MonadLogger m) => String -> (CreateProcess -> CreateProcess) -> Cmd -> m (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) Source #

Like createProcess_, but taking a Cmd. Note that the Handles provided by UseHandle are not closed automatically.

data Cmd Source #

Cmd holds common infos needed to running a process in most cases

Constructors

Cmd 

Fields