Skip to content

Commit

Permalink
Merge pull request #1579 from akhilnarang/disallow-uninstalling-frappe
Browse files Browse the repository at this point in the history
fix: don't allow uninstall frappe...
  • Loading branch information
akhilnarang authored Aug 30, 2024
2 parents e88fbc4 + 1ab3763 commit bb2e324
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# 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,
Expand Down Expand Up @@ -122,6 +122,8 @@ def install(self, app, branch=None):
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:
Expand Down

0 comments on commit bb2e324

Please sign in to comment.