From 32ddebc0309a73c50e0f1974b4f9435fce3f86c9 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 09:52:36 +0100 Subject: Reaktor.Plugins.System: Command -> SystemCommand --- src/Reaktor/Plugins/System/Internal.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Reaktor/Plugins/System/Internal.hs') 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" -- cgit v1.2.3