diff --git a/src/_nebari/utils.py b/src/_nebari/utils.py index 5f0877666..e6243fca2 100644 --- a/src/_nebari/utils.py +++ b/src/_nebari/utils.py @@ -55,8 +55,10 @@ def run_subprocess_cmd(processargs, prefix=b"", capture_output=False, **kwargs): if capture_output: stderr_stream = subprocess.PIPE + print_stream = process.stderr else: stderr_stream = subprocess.STDOUT + print_stream = process.stdout timeout = 0 if "timeout" in kwargs: @@ -84,7 +86,6 @@ def kill_process(): timeout_timer = threading.Timer(timeout, kill_process) timeout_timer.start() - print_stream = process.stderr if capture_output else process.stdout for line in iter(lambda: print_stream.readline(), b""): full_line = line_prefix + line if strip_errors: