Safe Haskell | None |
---|
System.Process.Hooks
- data HooksSpec
- defaultHooksSpec :: HooksSpec
- inDir :: FilePath -> HooksSpec -> HooksSpec
- withArg :: Text -> HooksSpec -> HooksSpec
- withEnv :: Text -> Text -> HooksSpec -> HooksSpec
- withWorkingDir :: FilePath -> HooksSpec -> HooksSpec
- recurseDir :: FilePath -> HooksSpec -> HooksSpec
- noRecurseDir :: FilePath -> HooksSpec -> HooksSpec
- closeFDs :: HooksSpec -> HooksSpec
- noCloseFDs :: HooksSpec -> HooksSpec
- data ProcessData = ProcessData {}
- pHandle :: ProcessData -> ProcessHandle
- runHooks :: HooksSpec -> IO (Either String [ProcessData])
- runHooksInDir :: FilePath -> [Text] -> IO (Either String [ProcessData])
- runAndWaitForHooksInDir :: FilePath -> [Text] -> IO (Either String [ExitCode])
- waitForHooks :: [ProcessData] -> IO [ExitCode]
- readStdErr :: ProcessData -> IO Text
- readStdOut :: ProcessData -> IO Text
- data StdStream = Inherit
Documentation
defaultHooksSpec :: HooksSpecSource
Default HooksSpec
that will not find any hooks. Be sure to add
a directory with inDir
, noRecurseDir
or recurseDir
.
inDir :: FilePath -> HooksSpec -> HooksSpecSource
Set the directory in which the hooks are to be found.
This is the same as noRecurse
withWorkingDir :: FilePath -> HooksSpec -> HooksSpecSource
recurseDir :: FilePath -> HooksSpec -> HooksSpecSource
noRecurseDir :: FilePath -> HooksSpec -> HooksSpecSource
data ProcessData Source
runHooks :: HooksSpec -> IO (Either String [ProcessData])Source
Create all exectuables in the directory specified by the
runHooksInDir :: FilePath -> [Text] -> IO (Either String [ProcessData])Source
Run all hooks in the directory with the given arguments.
See defaultHooksSpec
for other configuration.
runAndWaitForHooksInDir :: FilePath -> [Text] -> IO (Either String [ExitCode])Source
Run hooks in directory with given arguments and wait for completion.
This is the straightforward combination of runHooksInDir
and
waitForHooks
.
waitForHooks :: [ProcessData] -> IO [ExitCode]Source
Wait for all hooks to finish running.
readStdErr :: ProcessData -> IO TextSource
Read stderr from processdata waiting for the process to exit. It will yield an empty string if no stderr handle is given.
readStdOut :: ProcessData -> IO TextSource
Read stdout from processdata waiting for the process to exit. It will yield an empty string if no stdout handle is given.