Skip to content

Commit

Permalink
build: fix npm install with --shared
Browse files Browse the repository at this point in the history
The npm install rules had a hidden dependency on the `node` binary
install rule creating the `$PREFIX/bin` directory.

Because with `./configure --shared` no binary is created, the rule
subsequently failed.  Fix that by creating the directory before
creating the symlinks to the npm and npx scripts.

(Whether it makes sense to install npm without a `node` binary is
a separate question.  This commit is not taking positions. :-))

Regression introduced in commit ed8c89a ("build: fix shared installing
target") which, as the commit log indicates, was itself a bug fix for
the `./configure --shared` install.

PR-URL: #16438
Fixes: #16437
Ref: #15148
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
bnoordhuis authored and mhdawson committed Oct 25, 2017
1 parent a399881 commit e714c42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def try_unlink(path):
def try_symlink(source_path, link_path):
print 'symlinking %s -> %s' % (source_path, link_path)
try_unlink(link_path)
try_mkdir_r(os.path.dirname(link_path))
os.symlink(source_path, link_path)

def try_mkdir_r(path):
Expand Down

0 comments on commit e714c42

Please sign in to comment.