Skip to content

Commit 569a67e

Browse files
committed
fixes #216
1 parent a1446b9 commit 569a67e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fastcore/xtras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def run(cmd, *rest, ignore_ex=False, as_bytes=False):
265265
"Pass `cmd` (splitting with `shlex` if string) to `subprocess.run`; return `stdout`; raise `IOError` if fails"
266266
if rest: cmd = (cmd,)+rest
267267
elif isinstance(cmd,str): cmd = shlex.split(cmd)
268-
res = subprocess.run(cmd, capture_output=True)
268+
res = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
269269
stdout = res.stdout
270270
if not as_bytes: stdout = stdout.decode()
271271
if ignore_ex: return (res.returncode, stdout)

nbs/03_xtras.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@
13941394
" \"Pass `cmd` (splitting with `shlex` if string) to `subprocess.run`; return `stdout`; raise `IOError` if fails\"\n",
13951395
" if rest: cmd = (cmd,)+rest\n",
13961396
" elif isinstance(cmd,str): cmd = shlex.split(cmd)\n",
1397-
" res = subprocess.run(cmd, capture_output=True)\n",
1397+
" res = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n",
13981398
" stdout = res.stdout\n",
13991399
" if not as_bytes: stdout = stdout.decode()\n",
14001400
" if ignore_ex: return (res.returncode, stdout)\n",

0 commit comments

Comments
 (0)