diff --git a/django_migration_linter/migration_linter.py b/django_migration_linter/migration_linter.py index edc32ff..69158ff 100644 --- a/django_migration_linter/migration_linter.py +++ b/django_migration_linter/migration_linter.py @@ -143,7 +143,9 @@ class MigrationLinter(object): sql_statements.append(line) sqlmigrate_process.wait() if sqlmigrate_process.returncode != 0: - raise RuntimeError('sqlmigrate command failed') + _, err = sqlmigrate_process.communicate() + raise RuntimeError('sqlmigrate command failed {0}'.format( + err.decode('utf-8'))) log.info('Found {0} sql migration lines'.format(len(sql_statements))) return sql_statements