1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-20 20:09:07 +00:00

#484: Use PIPE as stdin when Popening the script

Fix #484
This commit is contained in:
Pablo Santiago Blum de Aguiar 2016-03-21 16:58:31 -03:00
parent 0cf4f5e8b0
commit a27115bff1
2 changed files with 2 additions and 1 deletions

View File

@ -110,6 +110,7 @@ class TestCommand(object):
'apt-get search vim', 'stdout', 'stderr')
Popen.assert_called_once_with('apt-get search vim',
shell=True,
stdin=PIPE,
stdout=PIPE,
stderr=PIPE,
env={})

View File

@ -114,7 +114,7 @@ class Command(object):
env.update(settings.env)
with logs.debug_time(u'Call: {}; with env: {};'.format(script, env)):
result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE, env=env)
result = Popen(script, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env)
if cls._wait_output(result):
stdout = result.stdout.read().decode('utf-8')
stderr = result.stderr.read().decode('utf-8')