Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 42 lines (36 sloc) 1.024 kb
#!/usr/bin/env python
import os
import subprocess
import sys
def node_version():
try:
proc = subprocess.Popen(['node', '-v'], stdout=subprocess.PIPE,stderr=subprocess.PIPE)
except OSError:
return None
version = proc.communicate()[0].rstrip('\n').lstrip('v')
return version
def npm_version():
try:
proc = subprocess.Popen(['npm', '-v'], stdout=subprocess.PIPE,stderr=subprocess.PIPE)
except OSError:
return None
version = proc.communicate()[0].rstrip('\n').lstrip('v')
return version
errors = False
version = node_version()
if version == None:
print 'Node is not installed.'
errors = True
elif int(version.replace('.', '')) < 615:
print 'Node version needs to be higher than 0.6.15'
errors = True
else:
print 'Node is installed. Version: ' + version
npm_version = npm_version()
if npm_version == None:
print 'Npm is not installed.'
errors = true
else:
print 'Npm is installed. Version: ' + npm_version
if errors == False:
print 'Install azure by running "make install"'
Jump to Line
Something went wrong with that request. Please try again.