Skip to content

Commit 0bb099f

Browse files
committed
build: expand ~ in install prefix early
The install prefix gets written to config.gypi and config.mk. Tildes were expanded in the first file but not in the second one, causing the `make install` target to install files to a directory named `~` in the current working directory. Fixes: #75 PR-URL: #2307 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent a020d9a commit 0bb099f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

configure

+4-1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ parser.add_option('--enable-static',
335335

336336
(options, args) = parser.parse_args()
337337

338+
# Expand ~ in the install prefix now, it gets written to multiple files.
339+
options.prefix = os.path.expanduser(options.prefix or '')
340+
338341
# set up auto-download list
339342
auto_downloads = nodedownload.parse(options.download_list)
340343

@@ -611,7 +614,7 @@ def configure_mips(o):
611614
def configure_node(o):
612615
if options.dest_os == 'android':
613616
o['variables']['OS'] = 'android'
614-
o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '')
617+
o['variables']['node_prefix'] = options.prefix
615618
o['variables']['node_install_npm'] = b(not options.without_npm)
616619
o['default_configuration'] = 'Debug' if options.debug else 'Release'
617620

0 commit comments

Comments
 (0)