From: IgorKlopov Date: Tue, 25 Nov 2014 21:53:08 +0000 (-0800) Subject: Compose full list in one place X-Git-Tag: v0.19.5~9^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0ab4475f249ff888fe788ae1d6dc09159fc43b85;p=electron.git Compose full list in one place --- diff --git a/script/compile-coffee.py b/script/compile-coffee.py index 8d02bf96..48c25258 100755 --- a/script/compile-coffee.py +++ b/script/compile-coffee.py @@ -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