Compose full list in one place

This commit is contained in:
IgorKlopov 2014-11-25 13:53:08 -08:00
parent 5137e16485
commit 0ab4475f24

View file

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