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

Fix update_node_packages arg

This commit is contained in:
Faris Ansari 2018-02-22 13:15:27 +05:30
parent 4ce74759e2
commit 5ac9e9d835

View File

@ -428,7 +428,7 @@ def update_requirements(bench_path='.'):
req_file = os.path.join(apps_dir, app, 'requirements.txt') req_file = os.path.join(apps_dir, app, 'requirements.txt')
install_requirements(pip, req_file) install_requirements(pip, req_file)
def update_node_packages(): def update_node_packages(bench_path='.'):
print('Updating node packages...') print('Updating node packages...')
from bench.app import get_current_version from bench.app import get_current_version
v = semantic_version.Version(get_current_version('frappe')) v = semantic_version.Version(get_current_version('frappe'))
@ -436,9 +436,9 @@ def update_node_packages():
# After rollup was merged, frappe_version = 10.1 # After rollup was merged, frappe_version = 10.1
# anything before that was npm based # anything before that was npm based
if v.major <= 10 and v.minor < 1: if v.major <= 10 and v.minor < 1:
update_npm_packages() update_npm_packages(bench_path)
else: else:
update_yarn_packages() update_yarn_packages(bench_path)
def update_yarn_packages(bench_path='.'): def update_yarn_packages(bench_path='.'):
apps_dir = os.path.join(bench_path, 'apps') apps_dir = os.path.join(bench_path, 'apps')