diff --git a/script/compile-coffee.py b/script/compile-coffee.py index 8d02bf9693c2b..48c25258a0fb6 100755 --- a/script/compile-coffee.py +++ b/script/compile-coffee.py @@ -9,7 +9,7 @@ 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