#N/A: Improve support to Windows in no_command rule (#918)
Windows “not found” message is quite different from POSIX systems.
This commit is contained in:
committed by
Vladimir Iakovlev
parent
70a13406f0
commit
5efcf1019f
@@ -6,7 +6,8 @@ from thefuck.specific.sudo import sudo_support
|
||||
@sudo_support
|
||||
def match(command):
|
||||
return (not which(command.script_parts[0])
|
||||
and 'not found' in command.output
|
||||
and ('not found' in command.output
|
||||
or 'is not recognized as' in command.output)
|
||||
and bool(get_close_matches(command.script_parts[0],
|
||||
get_all_executables())))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user