From 5f48445b81607132f6a5770c7d5130fa9ef94b8f Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Tue, 13 Aug 2019 14:35:22 +0200 Subject: Add verbose logging support for readProcess calls --- lib/Distribution/Helper.hs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/Distribution/Helper.hs b/lib/Distribution/Helper.hs index 79c9d57..8ce5f94 100644 --- a/lib/Distribution/Helper.hs +++ b/lib/Distribution/Helper.hs @@ -209,16 +209,9 @@ mkQueryEnv projloc distdir = do cr <- newIORef $ QueryCache Nothing Map.empty return $ QueryEnv { qeReadProcess = \stdin mcwd env exe args -> do - env' <- execEnvOverrides env - let cp = (proc exe args) - { cwd = mcwd - , env = if env == [] then Nothing else Just env' - } - readCreateProcess cp stdin - , qeCallProcess = \mcwd env exe args -> do - let ?verbose = \_ -> False -- TODO: we should get this from env or - -- something - callProcessStderr mcwd env exe args + withVerbosity $ readProcessStderr mcwd env exe args "" + , qeCallProcess = \mcwd env exe args -> + withVerbosity $ callProcessStderr mcwd env exe args , qePrograms = defaultPrograms , qeProjLoc = projloc , qeDistDir = distdir -- cgit v1.2.3