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

add check for npm and node

This commit is contained in:
Pratik Vyas 2015-08-16 23:27:44 -07:00
parent 3956586421
commit 568350c02c

View File

@ -508,6 +508,9 @@ def pre_upgrade(from_ver, to_ver, bench='.'):
if os.path.exists(cwd):
exec_cmd("git clean -dxf", cwd=cwd)
exec_cmd("{pip} install --upgrade -e {app}".format(pip=pip, app=cwd))
if to_ver >= 5:
if not find_executable('npm') and not find_executable('node'):
raise Exception("Please install node and npm")
def post_upgrade(from_ver, to_ver, bench='.'):
from .config import generate_nginx_config, generate_supervisor_config, generate_redis_cache_config, generate_redis_async_broker_config