WINDOWS_NODE_PATHs are to stay

WINDOWS_NODE_PATHs are checked first, and then os.environ['PATH']
This commit is contained in:
IgorKlopov 2014-11-25 13:46:09 -08:00
parent 91a3e12ab0
commit 5137e16485

View file

@ -6,7 +6,10 @@ import sys
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
WINDOWS_NODE_PATHs = [
'C:/Program Files/nodejs',
'C:/Program Files (x86)/nodejs',
]
def main():
input_file = sys.argv[1]
@ -26,7 +29,7 @@ def main():
def find_node():
PATHs = os.environ['PATH'].split(os.pathsep)
PATHs = WINDOWS_NODE_PATHs + os.environ['PATH'].split(os.pathsep)
for path in PATHs:
full_path = os.path.join(path, 'node.exe')
if os.path.exists(full_path):