2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 08:30:39 +00:00

Install yarn if not found

This commit is contained in:
Faris Ansari 2018-02-19 20:25:35 +05:30
parent 37b2bbd379
commit b77434bb61

View File

@ -434,7 +434,10 @@ def update_npm_packages(bench_path='.'):
for app in os.listdir(apps_dir):
app_path = os.path.join(apps_dir, app)
if os.path.exists(os.path.join(app_path, 'package.json')):
exec_cmd('./node_modules/.bin/yarn install', cwd=app_path)
yarn_executable = './node_modules/.bin/yarn'
if not os.path.exists(os.path.join(app_path, yarn_executable)):
exec_cmd('npm install yarn', cwd=app_path)
exec_cmd('{yarn} install'.format(yarn=yarn_executable), cwd=app_path)
def install_requirements(pip, req_file):