Skip to content

Commit

Permalink
fix: don't allow uninstall frappe...
Browse files Browse the repository at this point in the history
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
  • Loading branch information
akhilnarang committed Aug 30, 2024
1 parent e88fbc4 commit 1ab3763
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 1ab3763

Please sign in to comment.