2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 00:04:38 +00:00

Merge pull request #1579 from akhilnarang/disallow-uninstalling-frappe

fix: don't allow uninstall frappe...
This commit is contained in:
Akhil Narang 2024-08-30 18:22:40 +05:30 committed by GitHub
commit bb2e324257
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ from typing import List, MutableSequence, TYPE_CHECKING, Union
# imports - module imports
import bench
from bench.exceptions import AppNotInstalledError, InvalidRemoteException
from bench.exceptions import AppNotInstalledError, InvalidRemoteException, ValidationError
from bench.config.common_site_config import setup_config
from bench.utils import (
UNSET_ARG,
@ -122,6 +122,8 @@ class Bench(Base, Validator):
self.apps.sync()
def uninstall(self, app, no_backup=False, force=False):
if app == "frappe":
raise ValidationError("You cannot uninstall the app `frappe`")
from bench.app import App
if not force: