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

Merge 7fe4c309a764d31ae219f9c489e5823c2c45a405 into c7e7e1d884d3bb241ea6448f72a989434c2a35ec

This commit is contained in:
Alice Jacka 2024-09-11 13:52:10 +00:00 committed by GitHub
commit 51017d9a47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,10 +3,9 @@ from thefuck.shells import shell
def match(command):
return (command.script.startswith('./')
and 'permission denied' in command.output.lower()
and os.path.exists(command.script_parts[0])
and not os.access(command.script_parts[0], os.X_OK))
return ('permission denied' in command.output.lower()
and os.path.exists(os.path.expanduser(command.script_parts[0]))
and not os.access(os.path.expanduser(command.script_parts[0]), os.X_OK))
def get_new_command(command):