summaryrefslogtreecommitdiff
path: root/bin/just-mr.py
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-04-07 16:41:45 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-04-07 16:47:24 +0200
commit70517f3eb622ec9cfd4d8f8cd298e82b5023ce1a (patch)
tree1593823f5e90294336ce7cfd2ed2413070299dbb /bin/just-mr.py
parentebd005e72e445f8b6a7cc62098e64f3138ea0952 (diff)
downloadjustbuild-70517f3eb622ec9cfd4d8f8cd298e82b5023ce1a.tar.gz
just-mr: fix run_cmd interface
... so that the calls using stdin/stdout redirect also work properly.
Diffstat (limited to 'bin/just-mr.py')
-rwxr-xr-xbin/just-mr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/just-mr.py b/bin/just-mr.py
index 472131d2..f010fec9 100755
--- a/bin/just-mr.py
+++ b/bin/just-mr.py
@@ -50,10 +50,10 @@ def fail(s):
log(s)
sys.exit(1)
-def run_cmd(cmd, *, env=None, cwd):
+def run_cmd(cmd, *, env=None, stdout=subprocess.DEVNULL, stdin=None, cwd):
result = subprocess.run(
cmd, cwd=cwd, env=env,
- stdout=subprocess.DEVNULL)
+ stdout=stdout, stdin=stdin)
if result.returncode != 0:
fail("Command %s in %s failed"
% (cmd, cwd))