1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 14:48:49 +00:00

Fixed index error when command is empty

This commit is contained in:
RetekBacsi 2019-10-02 09:47:05 +02:00
parent f9730e8483
commit b1d4360dd8

View File

@ -53,7 +53,8 @@ def get_output(script, expanded):
env = dict(os.environ)
env.update(settings.env)
is_slow = shlex.split(expanded)[0] in settings.slow_commands
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,