diff options
author | tv <tv@krebsco.de> | 2019-01-27 09:52:36 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-01-27 09:52:36 +0100 |
commit | 32ddebc0309a73c50e0f1974b4f9435fce3f86c9 (patch) | |
tree | 668171efc58a85e11b1d1e37ad2d71b021671b1f /src/Reaktor/Plugins/System/Internal.hs | |
parent | e9ca12a945b1d1c068e9c31050e264cb20690db4 (diff) |
Reaktor.Plugins.System: Command -> SystemCommand
Diffstat (limited to 'src/Reaktor/Plugins/System/Internal.hs')
-rw-r--r-- | src/Reaktor/Plugins/System/Internal.hs | 16 |
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" |