diff --git a/frappe/commands/site.py b/frappe/commands/site.py index eb5a732f04..13f642ea76 100644 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -420,6 +420,9 @@ def install_app(context, apps, force=False): print(f"An error occurred while installing {app}{err_msg}") exit_code = 1 + if not exit_code: + frappe.db.commit() + frappe.destroy() sys.exit(exit_code) diff --git a/frappe/utils/fixtures.py b/frappe/utils/fixtures.py index 6b3166bfe6..821b1a1187 100644 --- a/frappe/utils/fixtures.py +++ b/frappe/utils/fixtures.py @@ -25,8 +25,6 @@ def sync_fixtures(app=None): frappe.flags.in_fixtures = False - frappe.db.commit() - def import_custom_scripts(app): """Import custom scripts from `[app]/fixtures/custom_scripts`"""