Safe Haskell | None |
---|---|
Language | Haskell98 |
Running system commands. On some platforms this may cause the command to be executed directly, so
shell tricks won't work. The Build
monad can be made to log commands executed with all versions
of system
by setting buildConfigLogSystem
in the BuildConfig
passed to runBuildPrintWithConfig
.
We define a lot of wrappers because executing system commands is the bread-and-butter of buildbots, and we usually need all the versions...
- module System.Exit
- system :: String -> Build (ExitCode, String, String)
- systemq :: String -> Build (ExitCode, String, String)
- ssystem :: String -> Build (String, String)
- ssystemq :: String -> Build (String, String)
- sesystem :: String -> Build String
- sesystemq :: String -> Build String
- systemTee :: Bool -> String -> String -> Build (ExitCode, String, String)
- systemTeeLog :: Bool -> String -> Log -> Build (ExitCode, Log, Log)
- ssystemTee :: Bool -> String -> String -> Build ()
- systemTeeIO :: Bool -> String -> String -> IO (ExitCode, String, String)
- systemTeeLogIO :: Bool -> String -> Log -> IO (ExitCode, Log, Log)
Documentation
module System.Exit
Wrappers
system :: String -> Build (ExitCode, String, String) Source #
Run a system command,
returning its exit code and what it wrote to stdout
and stderr
.
systemq :: String -> Build (ExitCode, String, String) Source #
Quietly run a system command,
returning its exit code and what it wrote to stdout
and stderr
.
ssystem :: String -> Build (String, String) Source #
Run a successful system command,
returning what it wrote to stdout
and stderr
.
If the exit code is ExitFailure
then throw an error in the Build
monad.
ssystemq :: String -> Build (String, String) Source #
Quietly run a successful system command,
returning what it wrote to stdout
and stderr
.
If the exit code is ExitFailure
then throw an error in the Build
monad.
sesystem :: String -> Build String Source #
Run a successful system command, returning what it wrote to its stdout
.
If anything was written to stderr
then treat that as failure.
If it fails due to writing to stderr
or returning ExitFailure
then throw an error in the Build
monad.
sesystemq :: String -> Build String Source #
Quietly run a successful system command, returning what it wrote to its stdout
.
If anything was written to stderr
then treat that as failure.
If it fails due to writing to stderr
or returning ExitFailure
then throw an error in the Build
monad.
systemTee :: Bool -> String -> String -> Build (ExitCode, String, String) Source #
Like systemTeeIO
, but in the Build
monad.
systemTeeLog :: Bool -> String -> Log -> Build (ExitCode, Log, Log) Source #
Like systemTeeLogIO
, but in the Build
monad.
ssystemTee :: Bool -> String -> String -> Build () Source #
Like systemTeeIO
, but in the Build
monad and throw an error if it returns ExitFailure
.
systemTeeIO :: Bool -> String -> String -> IO (ExitCode, String, String) Source #
Like systemTeeLogIO
, but with strings.