Add output on git diff when failing & -v

This commit is contained in:
david_wobrock committed 2017-07-06 17:05:51 +02:00
1 parent de1928364d
commit dfbb130e42
1 file changed
+4
+4
View File
@@ -76,6 +76,10 @@ class MigrationLinter:
self.changed_migration_files.append(line.strip())
diff_process.wait()
if diff_process.returncode != 0:
output = []
for line in diff_process.stderr.readlines():
output.append(line)
log.info("Error while git diff command:\n{}".format("".join(output)))
raise Exception('Error while executing git diff command')
def lint_migrations(self):