2
0
mirror of https://github.com/frappe/bench.git synced 2025-02-13 08:18:27 +00:00

Merge pull request #985 from gavindsouza/yarn-install-fix

fix: install node modules only if package.json exists
This commit is contained in:
gavin 2020-05-06 12:26:08 +05:30 committed by GitHub
commit 00e6e8be31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,10 @@ def install_app(app, bench_path=".", verbose=False, no_cache=False, postprocess=
cache_flag = "--no-cache-dir" if no_cache else ""
exec_cmd("{pip} install {quiet} -U -e {app} {no_cache}".format(pip=pip_path, quiet=quiet_flag, app=app_path, no_cache=cache_flag))
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)
add_to_appstxt(app, bench_path=bench_path)
if postprocess: