mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 01:28:56 +00:00
Slow command timeout didn’t work
+ Fixed debug message to include is_slow * Using only the first word of shlex.split when checking if command is slow.
This commit is contained in:
parent
3bbd0e9463
commit
f9730e8483
@ -53,8 +53,8 @@ def get_output(script, expanded):
|
|||||||
env = dict(os.environ)
|
env = dict(os.environ)
|
||||||
env.update(settings.env)
|
env.update(settings.env)
|
||||||
|
|
||||||
is_slow = shlex.split(expanded) in settings.slow_commands
|
is_slow = shlex.split(expanded)[0] in settings.slow_commands
|
||||||
with logs.debug_time(u'Call: {}; with env: {}; is slow: '.format(
|
with logs.debug_time(u'Call: {}; with env: {}; is slow: {}'.format(
|
||||||
script, env, is_slow)):
|
script, env, is_slow)):
|
||||||
result = Popen(expanded, shell=True, stdin=PIPE,
|
result = Popen(expanded, shell=True, stdin=PIPE,
|
||||||
stdout=PIPE, stderr=STDOUT, env=env)
|
stdout=PIPE, stderr=STDOUT, env=env)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user