From c2165b471a83931d6d829286ba719402ba7aced2 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 21 Jan 2019 13:09:25 +0530 Subject: [PATCH] fix: pull app list from sites/apps.txt --- bench/utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bench/utils.py b/bench/utils.py index a1c41c06..c1fd8e1b 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -429,8 +429,16 @@ def update_requirements(bench_path='.'): bench_req_file = os.path.join(os.path.dirname(bench.__path__[0]), 'requirements.txt') install_requirements(pip, bench_req_file) + apps = [] from .app import install_app - for app in os.listdir(apps_dir): + + try: + with open(os.path.join(bench_path, 'sites', 'apps.txt')) as f: + apps = f.read().strip().split('\n') + except IOError: + apps = [] + + for app in apps: install_app(app, bench_path=bench_path) def update_node_packages(bench_path='.'):