diff --git a/bench/app.py b/bench/app.py index 5ff210b9..b1fddfce 100755 --- a/bench/app.py +++ b/bench/app.py @@ -423,11 +423,14 @@ def get_apps_json(path): return json.load(f) def validate_branch(): - for app in ['frappe', 'erpnext']: + installed_apps = get_apps() + check_apps = ['frappe', 'erpnext'] #this is a dirty work-around. bench update should not assume that erpnext is installed + intersection_apps = list(set(installed_apps) & set(check_apps)) + for app in intersection_apps: branch = get_current_branch(app) if branch == "master": print(''' master branch is renamed to version-11 and develop to version-12. Please switch to new branches to get future updates. To switch to version 11, run the following commands: bench switch-to-branch version-11''') - sys.exit(1) \ No newline at end of file + sys.exit(1)