stack-1.0.4.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

System.Process.Run

Description

Run sub-processes.

Synopsis

Documentation

runCmd Source

Arguments

:: forall (m :: * -> *). (MonadLogger m, MonadIO m, MonadBaseControl IO 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, MonadIO m, MonadBaseControl IO 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.

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.

Inherits stdout and stderr.

data ProcessExitedUnsuccessfully :: *

Indicates that a process exited with an non-success exit code.

Since 0.1.7

data Cmd Source

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

Constructors

Cmd 

Fields

cmdDirectoryToRunIn :: Maybe (Path Abs Dir)

directory to run in

cmdCommandToRun :: FilePath

command to run

cmdEnvOverride :: EnvOverride
 
cmdCommandLineArguments :: [String]

command line arguments