2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-11 15:51:03 +00:00

Install yarn locally

This commit is contained in:
Faris Ansari 2018-02-19 18:03:37 +05:30
parent 884c0766d2
commit 72968e6bb5
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import subprocess
import os
from bench.utils import exec_cmd
def execute(bench_path):
subprocess.check_output(['sudo', 'npm', 'install', '-g', 'yarn'])
exec_cmd('npm install yarn', os.path.join(bench_path, 'apps/frappe'))

View File

@ -434,7 +434,7 @@ 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('yarn install', cwd=app_path)
exec_cmd('./node_modules/.bin/yarn install', cwd=app_path)
def install_requirements(pip, req_file):