From c8f89e3ca5404bc30b3feac55c78e9d9850a43c4 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 17 Aug 2025 08:47:43 -0700 Subject: [PATCH] action_utils: Handle capture_output argument in run wrapper Signed-off-by: Sunil Mohan Adapa Reviewed-by: Veiko Aasa --- plinth/action_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plinth/action_utils.py b/plinth/action_utils.py index e7db636a1..8bed5ca0a 100644 --- a/plinth/action_utils.py +++ b/plinth/action_utils.py @@ -825,8 +825,10 @@ def run_as_user(command, username, **kwargs): def run(command, **kwargs): """Run subprocess.run but capture stdout and stderr in thread storage.""" - collect_stdout = ('stdout' not in kwargs) - collect_stderr = ('stderr' not in kwargs) + collect_stdout = ('stdout' not in kwargs + and 'capture_output' not in kwargs) + collect_stderr = ('stderr' not in kwargs + and 'capture_output' not in kwargs) if collect_stdout: kwargs['stdout'] = subprocess.PIPE