From 0ab4475f249ff888fe788ae1d6dc09159fc43b85 Mon Sep 17 00:00:00 2001 From: IgorKlopov Date: Tue, 25 Nov 2014 13:53:08 -0800 Subject: [PATCH] Compose full list in one place --- script/compile-coffee.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.43.0