summaryrefslogtreecommitdiffstats
path: root/src/Reaktor/Plugins/System
diff options
context:
space:
mode:
Diffstat (limited to 'src/Reaktor/Plugins/System')
-rw-r--r--src/Reaktor/Plugins/System/Internal.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Reaktor/Plugins/System/Internal.hs b/src/Reaktor/Plugins/System/Internal.hs
index d042217..78c8802 100644
--- a/src/Reaktor/Plugins/System/Internal.hs
+++ b/src/Reaktor/Plugins/System/Internal.hs
@@ -49,10 +49,10 @@ instance FromJSON Config where
data Hook = Hook
{ hActivate :: Activate
, hPattern :: Maybe Regex
- , hCommand :: CaptureOr Command
+ , hCommand :: CaptureOr SystemCommand
, hArguments :: [CaptureOr Text]
, hWorkDir :: Maybe FilePath
- , hCommands :: HashMap Text Command
+ , hCommands :: HashMap Text SystemCommand
, hTimeout :: Maybe Int
}
deriving Show
@@ -71,17 +71,17 @@ instance FromJSON Hook where
_ -> undefined
-data Command = Command
- { commandPath :: FilePath
- , commandWorkDir :: Maybe FilePath
- , commandEnv :: Maybe (HashMap String String)
+data SystemCommand = SystemCommand
+ { scPath :: FilePath
+ , scWorkDir :: Maybe FilePath
+ , scEnv :: Maybe (HashMap String String)
}
deriving Show
-instance FromJSON Command where
+instance FromJSON SystemCommand where
parseJSON = \case
Object v ->
- Command
+ SystemCommand
<$> v .: "filename"
<*> v .:? "workdir"
<*> v .:? "env"