From 2610b8435c4be381a9ee9fdda233946778d2fdaf Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Fri, 10 Jan 2025 11:25:13 +0530 Subject: [PATCH] fix(new-site): don't allow creating a site with the same name as an app Signed-off-by: Akhil Narang --- frappe/commands/site.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frappe/commands/site.py b/frappe/commands/site.py index ab2f8a08da..ed9560504f 100644 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -91,6 +91,12 @@ def new_site( frappe.init(site, new_site=True) + if site in frappe.get_all_apps(): + click.secho( + f"Your bench has an app called {site}, please choose another name for the site.", fg="red" + ) + sys.exit(1) + if no_mariadb_socket: click.secho( "--no-mariadb-socket is DEPRECATED; "