From 70517f3eb622ec9cfd4d8f8cd298e82b5023ce1a Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 7 Apr 2022 16:41:45 +0200 Subject: just-mr: fix run_cmd interface ... so that the calls using stdin/stdout redirect also work properly. --- bin/just-mr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/just-mr.py') 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)) -- cgit v1.2.3