commit
c5de8ea7bf
1 changed files with 7 additions and 6 deletions
|
@ -7,9 +7,9 @@ import sys
|
|||
|
||||
SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__))
|
||||
WINDOWS_NODE_PATHs = [
|
||||
'C:/Program Files/nodejs/node.exe',
|
||||
'C:/Program Files (x86)/nodejs/node.exe',
|
||||
]
|
||||
'C:/Program Files (x86)/nodejs',
|
||||
'C:/Program Files/nodejs',
|
||||
] + os.environ['PATH'].split(os.pathsep)
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -21,7 +21,7 @@ def main():
|
|||
if sys.platform in ['win32', 'cygwin']:
|
||||
node = find_node()
|
||||
if not node:
|
||||
print 'Node.js is required for building atom-shell'
|
||||
print 'Node.js not found in PATH for building atom-shell'
|
||||
return 1
|
||||
subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file],
|
||||
executable=node)
|
||||
|
@ -31,8 +31,9 @@ def main():
|
|||
|
||||
def find_node():
|
||||
for path in WINDOWS_NODE_PATHs:
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
full_path = os.path.join(path, 'node.exe')
|
||||
if os.path.exists(full_path):
|
||||
return full_path
|
||||
return None
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue