From 1ab3763fd6238fa9a906331690890c559275782d Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Fri, 30 Aug 2024 18:08:51 +0530 Subject: [PATCH] fix: don't allow uninstall frappe... Signed-off-by: Akhil Narang --- bench/bench.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bench/bench.py b/bench/bench.py index 0b0c7af77..dd2afc982 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -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, @@ -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: