Test if the file exists in the fix_file rule

This avoid false positives in `match`.
This commit is contained in:
mcarton
2015-07-29 21:35:49 +02:00
parent de513cacb1
commit 43fead02d3
2 changed files with 18 additions and 3 deletions
+6 -1
View File
@@ -50,7 +50,12 @@ def _search(stderr):
def match(command, settings):
return 'EDITOR' in os.environ and _search(command.stderr)
if 'EDITOR' not in os.environ:
return False
m = _search(command.stderr)
return m and os.path.isfile(m.group('file'))
def get_new_command(command, settings):