Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- data HooksSpec
- defaultHooksSpec :: HooksSpec
- inDir :: FilePath -> HooksSpec -> HooksSpec
- withArg :: Text -> HooksSpec -> HooksSpec
- withEnv :: Text -> Text -> HooksSpec -> HooksSpec
- withWorkingDir :: FilePath -> HooksSpec -> HooksSpec
- withStdOut :: StdStream -> HooksSpec -> HooksSpec
- withStdIn :: StdStream -> HooksSpec -> HooksSpec
- withStdErr :: StdStream -> 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 :: HooksSpec Source
Default HooksSpec
that will not find any hooks. Be sure to add
a directory with inDir
, noRecurseDir
or recurseDir
.
inDir :: FilePath -> HooksSpec -> HooksSpec Source
Set the directory in which the hooks are to be found.
This is the same as noRecurse
withWorkingDir :: FilePath -> HooksSpec -> HooksSpec Source
withStdOut :: StdStream -> HooksSpec -> HooksSpec Source
withStdErr :: StdStream -> HooksSpec -> HooksSpec Source
recurseDir :: FilePath -> HooksSpec -> HooksSpec Source
noRecurseDir :: FilePath -> HooksSpec -> HooksSpec Source
noCloseFDs :: HooksSpec -> HooksSpec Source
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 Text Source
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 Text Source
Read stdout from processdata waiting for the process to exit. It will yield an empty string if no stdout handle is given.