Handle quoted paths in ansible-test diff parsing.

This commit is contained in:
Matt Clay 2019-08-02 09:24:14 -07:00
parent 13c8f7b00c
commit 4df97c20b6

View file

@ -180,7 +180,7 @@ class DiffParser:
"""Process a diff start line."""
self.complete_file()
match = re.search(r'^diff --git a/(?P<old_path>.*) b/(?P<new_path>.*)$', self.line)
match = re.search(r'^diff --git "?a/(?P<old_path>.*)"? "?b/(?P<new_path>.*)"?$', self.line)
if not match:
raise Exception('Unexpected diff start line.')