2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-24 15:38:25 +00:00

install yarn using sudo (#574)

This commit is contained in:
Faris Ansari 2018-02-19 14:26:25 +05:30 committed by GitHub
parent 5d0a453ccb
commit 884c0766d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import subprocess import subprocess
def execute(bench_path): def execute(bench_path):
subprocess.check_output(['npm', 'install', '-g', 'yarn']) subprocess.check_output(['sudo', 'npm', 'install', '-g', 'yarn'])

View File

@ -433,7 +433,8 @@ 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)
exec_cmd('yarn install', cwd=app_path) if os.path.exists(os.path.join(app_path, 'package.json')):
exec_cmd('yarn install', cwd=app_path)
def install_requirements(pip, req_file): def install_requirements(pip, req_file):