summaryrefslogtreecommitdiff
path: root/src/Process.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-12-06 11:16:46 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-12-06 20:11:59 +0100
commit6c5eaccc5d79502a3ab67190a996025635f88564 (patch)
tree048823f91ec9271d021f909d57a96d063953e8c5 /src/Process.hs
parentb6b1c6e8b446abc80a3f4b6f382407e4e262e28e (diff)
Show command and arguments for spawned processes in output
Changelog: Show command and arguments for spawned processes in verbose output
Diffstat (limited to 'src/Process.hs')
-rw-r--r--src/Process.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Process.hs b/src/Process.hs
index 1389987..a575e76 100644
--- a/src/Process.hs
+++ b/src/Process.hs
@@ -3,7 +3,7 @@ module Process (
ProcName(..),
textProcName, unpackProcName,
send,
- outProc,
+ outProc, outProcName,
lineReadingLoop,
startProcessIOLoops,
spawnOn,
@@ -88,7 +88,10 @@ send p line = liftIO $ do
hFlush (procStdin p)
outProc :: MonadOutput m => OutputType -> Process -> Text -> m ()
-outProc otype p line = outLine otype (Just $ textProcName $ procName p) line
+outProc otype p line = outProcName otype (procName p) line
+
+outProcName :: MonadOutput m => OutputType -> ProcName -> Text -> m ()
+outProcName otype pname line = outLine otype (Just $ textProcName pname) line
lineReadingLoop :: MonadOutput m => Process -> Handle -> (Text -> m ()) -> m ()
lineReadingLoop process h act =