summaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Plugins/System
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-27 20:19:16 +0100
committertv <tv@krebsco.de>2019-01-27 20:20:16 +0100
commit0e199f7a357a4c5973e5837ec67699cf224ca69c (patch)
tree178a04410ae34e148b9fb8d0624a76995e0fd187 /src/Reaktor/Plugins/System
parent24d095cad7969a7bdadd1fa05c4742f4d66033e6 (diff)
Reaktor.Plugins.System: add hEnv
Diffstat (limited to 'src/Reaktor/Plugins/System')
-rw-r--r--src/Reaktor/Plugins/System/Internal.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Reaktor/Plugins/System/Internal.hs b/src/Reaktor/Plugins/System/Internal.hs
index e4356df..82aad6c 100644
--- a/src/Reaktor/Plugins/System/Internal.hs
+++ b/src/Reaktor/Plugins/System/Internal.hs
@@ -52,6 +52,7 @@ data Hook = Hook
, hPattern :: Maybe Regex
, hCommand :: CaptureOr SystemCommand
, hArguments :: [CaptureOr Text]
+ , hEnv :: Maybe (HashMap String String)
, hWorkDir :: Maybe FilePath
, hCommands :: HashMap Text SystemCommand
, hTimeout :: Maybe Int
@@ -66,6 +67,7 @@ instance FromJSON Hook where
<*> (fmap (flip RE.compile [RE.utf8]) <$> v .:? "pattern")
<*> v .: "command"
<*> v .:? "arguments" .!= []
+ <*> v .:? "env"
<*> v .:? "workdir"
<*> v .:? "commands" .!= mempty
<*> (fmap (*1000000) <$> v .:? "timeoutSec" .!= Just 10)