mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 23:48:24 +00:00
Install yarn if not found
This commit is contained in:
parent
37b2bbd379
commit
b77434bb61
@ -434,7 +434,10 @@ def update_npm_packages(bench_path='.'):
|
|||||||
for app in os.listdir(apps_dir):
|
for app in os.listdir(apps_dir):
|
||||||
app_path = os.path.join(apps_dir, app)
|
app_path = os.path.join(apps_dir, app)
|
||||||
if os.path.exists(os.path.join(app_path, 'package.json')):
|
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):
|
def install_requirements(pip, req_file):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user