From a446c3247891f5e4e17c22dea5c9c8c9b8daa27c Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Fri, 20 Aug 2021 14:11:17 +0100
Subject: [PATCH] RF: Change default behaviour of run function so that
 stdout/stderr are forwarded to parent process in addition to being captured
 and returned (#373)

---
 fsl/utils/run.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/fsl/utils/run.py b/fsl/utils/run.py
index 6117934b1..55859cc8c 100644
--- a/fsl/utils/run.py
+++ b/fsl/utils/run.py
@@ -152,12 +152,14 @@ def run(*args, **kwargs):
                    executed, but rather is returned directly, as a list of
                    arguments.
 
-    :arg log:      Must be passed as a keyword argument.  An optional ``dict``
-                   which may be used to redirect the command's standard output
-                   and error. The following keys are recognised:
+    :arg log:      Must be passed as a keyword argument.  Defaults to
+                   ``{'tee' : True}``. An optional ``dict`` which may be used
+                   to redirect the command's standard output and error. The
+                   following keys are recognised:
 
-                     - tee:    If ``True``, the command's standard output/error
-                               streams are forwarded to this processes streams.
+                     - tee:    If ``True`` (the default), the command's
+                               standard output/error streams are forwarded to
+                               this processes streams.
 
                      - stdout: Optional file-like object to which the command's
                                standard output stream can be forwarded.
@@ -189,7 +191,7 @@ def run(*args, **kwargs):
     if logg is None:
         logg = {}
 
-    tee       = logg.get('tee',    False)
+    tee       = logg.get('tee',    True)
     logStdout = logg.get('stdout', None)
     logStderr = logg.get('stderr', None)
     logCmd    = logg.get('cmd',    None)
-- 
GitLab