mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-03-29 08:39:03 +08:00
Compose full list in one place
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user