Safe Haskell | None |
---|---|
Language | Haskell2010 |
System.Process.Run
Description
Run sub-processes.
- runCmd :: forall m. (MonadLogger m, MonadIO m, MonadBaseControl IO m) => Cmd -> Maybe Text -> m ()
- runCmd' :: forall m. (MonadLogger m, MonadIO m, MonadBaseControl IO m) => (CreateProcess -> CreateProcess) -> Cmd -> Maybe Text -> m ()
- callProcess :: (MonadIO m, MonadLogger m) => Cmd -> m ()
- callProcess' :: (MonadIO m, MonadLogger m) => (CreateProcess -> CreateProcess) -> Cmd -> m ()
- data ProcessExitedUnsuccessfully :: *
- data Cmd = Cmd {}
Documentation
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.
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
Cmd holds common infos needed to running a process in most cases
Constructors
Cmd | |
Fields
|