mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
Fixed patch
This commit is contained in:
parent
98ab39637f
commit
7c13d16a62
@ -3,26 +3,27 @@ from semantic_version import Version
|
|||||||
from distutils.spawn import find_executable
|
from distutils.spawn import find_executable
|
||||||
|
|
||||||
def execute(bench_path):
|
def execute(bench_path):
|
||||||
expected_node_ver = Version('5.0.0')
|
expected_node_ver = Version('5.0.0')
|
||||||
node_exec = find_executable('node')
|
node_exec = find_executable('node') or find_executable('nodejs')
|
||||||
|
|
||||||
if node_exec:
|
|
||||||
result = subprocess.check_output([node_exec, '-v'])
|
|
||||||
else:
|
|
||||||
click.echo('''
|
|
||||||
No node executable was found on your machine.
|
|
||||||
Please install node 5.x before running "bench update".
|
|
||||||
Installation instructions for CentOS and Ubuntu can be found on the following link,
|
|
||||||
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/"
|
|
||||||
''')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
node_ver = Version(result.rstrip('\n').lstrip('v'))
|
if node_exec:
|
||||||
|
result = subprocess.check_output([node_exec, '-v'])
|
||||||
|
else:
|
||||||
|
click.echo('''
|
||||||
|
No node executable was found on your machine.
|
||||||
|
Please install node 5.x before running "bench update".
|
||||||
|
Installation instructions for CentOS and Ubuntu can be found on the following link,
|
||||||
|
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/"
|
||||||
|
''')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if node_ver < expected_node_ver:
|
node_ver = Version(result.rstrip('\n').lstrip('v'))
|
||||||
click.echo('''
|
|
||||||
Please update node version to 5.x before running "bench update".
|
if node_ver < expected_node_ver:
|
||||||
Installation instructions for CentOS and Ubuntu can be found on the following link,
|
click.echo('''
|
||||||
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/"
|
Please update node version to 5.x before running "bench update".
|
||||||
''')
|
Installation instructions for CentOS and Ubuntu can be found on the following link,
|
||||||
sys.exit(1)
|
"https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/"
|
||||||
|
''')
|
||||||
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user