hooks-dir-0.1.0.0: run executables in a directory as hooks

Safe HaskellNone

System.Process.Hooks

Synopsis

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

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.

data StdStream

Constructors

Inherit

Inherit Handle from parent