mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 12:06:04 +00:00
Slow command timeout didn’t work (#961)
* 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. * Fixed index error when command is empty
This commit is contained in:
parent
3bbd0e9463
commit
64dd018c1a
@ -53,8 +53,9 @@ def get_output(script, expanded):
|
||||
env = dict(os.environ)
|
||||
env.update(settings.env)
|
||||
|
||||
is_slow = shlex.split(expanded) in settings.slow_commands
|
||||
with logs.debug_time(u'Call: {}; with env: {}; is slow: '.format(
|
||||
split_expand = shlex.split(expanded)
|
||||
is_slow = split_expand[0] in settings.slow_commands if split_expand else False
|
||||
with logs.debug_time(u'Call: {}; with env: {}; is slow: {}'.format(
|
||||
script, env, is_slow)):
|
||||
result = Popen(expanded, shell=True, stdin=PIPE,
|
||||
stdout=PIPE, stderr=STDOUT, env=env)
|
||||
|
Loading…
x
Reference in New Issue
Block a user