mirror of
https://github.com/frappe/bench.git
synced 2025-01-23 15:08:24 +00:00
Merge pull request #1579 from akhilnarang/disallow-uninstalling-frappe
fix: don't allow uninstall frappe...
This commit is contained in:
commit
bb2e324257
@ -10,7 +10,7 @@ from typing import List, MutableSequence, TYPE_CHECKING, Union
|
|||||||
|
|
||||||
# imports - module imports
|
# imports - module imports
|
||||||
import bench
|
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.config.common_site_config import setup_config
|
||||||
from bench.utils import (
|
from bench.utils import (
|
||||||
UNSET_ARG,
|
UNSET_ARG,
|
||||||
@ -122,6 +122,8 @@ class Bench(Base, Validator):
|
|||||||
self.apps.sync()
|
self.apps.sync()
|
||||||
|
|
||||||
def uninstall(self, app, no_backup=False, force=False):
|
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
|
from bench.app import App
|
||||||
|
|
||||||
if not force:
|
if not force:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user