mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-20 20:09:07 +00:00
A special case for 'Permission denied' error msg when trying to execute a
python scripy. The script does not have execute permission and/or does not start with !#/usr/... In that case, pre-pend the command with 'python' keyword. Change-Id: Idf73ee9cf0a523f51c78672188a457b2fcedc1e6
This commit is contained in:
parent
17397bf30f
commit
cb31a1f7d0
@ -4,7 +4,8 @@
|
||||
|
||||
def match(command, settings):
|
||||
toks = command.script.split()
|
||||
return (toks[0].endswith('.py')
|
||||
return (len(toks) > 0
|
||||
and toks[0].endswith('.py')
|
||||
and ('Permission denied' in command.stderr or
|
||||
'command not found' in command.stderr))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user