mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
feat: pass verbose to npm install
This commit is contained in:
parent
346d08d30f
commit
00391bfeb9
@ -58,7 +58,7 @@ def update_node_packages(bench_path=".", apps=None, verbose=None):
|
|||||||
# After rollup was merged, frappe_version = 10.1
|
# After rollup was merged, frappe_version = 10.1
|
||||||
# if develop_verion is 11 and up, only then install yarn
|
# if develop_verion is 11 and up, only then install yarn
|
||||||
if v < LooseVersion("11.x.x-develop"):
|
if v < LooseVersion("11.x.x-develop"):
|
||||||
update_npm_packages(bench_path, apps=apps)
|
update_npm_packages(bench_path, apps=apps, verbose=verbose)
|
||||||
else:
|
else:
|
||||||
update_yarn_packages(bench_path, apps=apps, verbose=verbose)
|
update_yarn_packages(bench_path, apps=apps, verbose=verbose)
|
||||||
|
|
||||||
@ -133,7 +133,9 @@ def update_yarn_packages(bench_path=".", apps=None, verbose=None):
|
|||||||
bench.run(yarn_install, cwd=app_path)
|
bench.run(yarn_install, cwd=app_path)
|
||||||
|
|
||||||
|
|
||||||
def update_npm_packages(bench_path=".", apps=None):
|
def update_npm_packages(bench_path=".", apps=None, verbose=None):
|
||||||
|
verbose = bench.cli.verbose or verbose
|
||||||
|
npm_install = "npm install --verbose" if verbose else "npm install"
|
||||||
apps_dir = os.path.join(bench_path, "apps")
|
apps_dir = os.path.join(bench_path, "apps")
|
||||||
package_json = {}
|
package_json = {}
|
||||||
|
|
||||||
@ -165,7 +167,7 @@ def update_npm_packages(bench_path=".", apps=None):
|
|||||||
with open(os.path.join(bench_path, "package.json"), "w") as f:
|
with open(os.path.join(bench_path, "package.json"), "w") as f:
|
||||||
f.write(json.dumps(package_json, indent=1, sort_keys=True))
|
f.write(json.dumps(package_json, indent=1, sort_keys=True))
|
||||||
|
|
||||||
exec_cmd("npm install", cwd=bench_path)
|
exec_cmd(npm_install, cwd=bench_path)
|
||||||
|
|
||||||
|
|
||||||
def migrate_env(python, backup=False):
|
def migrate_env(python, backup=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user