Skip to content

Commit 8035527

Browse files
committedMay 16, 2017
build: simplify if in setting of arg_paths
PR-URL: #12653 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 4aff056 commit 8035527

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
 

‎tools/gyp_node.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,11 @@ def run_gyp(args):
1616
# GYP bug.
1717
# On msvs it will crash if it gets an absolute path.
1818
# On Mac/make it will crash if it doesn't get an absolute path.
19-
if sys.platform == 'win32':
20-
args.append(os.path.join(node_root, 'node.gyp'))
21-
common_fn = os.path.join(node_root, 'common.gypi')
22-
options_fn = os.path.join(node_root, 'config.gypi')
23-
options_fips_fn = os.path.join(node_root, 'config_fips.gypi')
24-
else:
25-
args.append(os.path.join(os.path.abspath(node_root), 'node.gyp'))
26-
common_fn = os.path.join(os.path.abspath(node_root), 'common.gypi')
27-
options_fn = os.path.join(os.path.abspath(node_root), 'config.gypi')
28-
options_fips_fn = os.path.join(os.path.abspath(node_root), 'config_fips.gypi')
19+
a_path = node_root if sys.platform == 'win32' else os.path.abspath(node_root)
20+
args.append(os.path.join(a_path, 'node.gyp'))
21+
common_fn = os.path.join(a_path, 'common.gypi')
22+
options_fn = os.path.join(a_path, 'config.gypi')
23+
options_fips_fn = os.path.join(a_path, 'config_fips.gypi')
2924

3025
if os.path.exists(common_fn):
3126
args.extend(['-I', common_fn])

0 commit comments

Comments
 (0)