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

remove 2nd else

This commit is contained in:
Inga Feick 2019-04-10 16:52:36 +02:00
parent c34b65d3fb
commit dc570f8fd3

View File

@ -11,5 +11,5 @@ def match(command):
def get_new_command(command):
if '--user' not in command.script: # add --user (attempt 1)
return command.script.replace(' install ', ' install --user ')
else: # since --user didn't fix things, let's try sudo (attempt 2)
return 'sudo {}'.format(command.script.replace(' --user', ''))
return 'sudo {}'.format(command.script.replace(' --user', '')) # since --user didn't fix things, let's try sudo (attempt 2)