From 632e166144dab0ef703398f6e69f6fae6d8cada4 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 24 Oct 2017 13:01:50 +0200 Subject: [PATCH] build: fix npm install with --shared 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: https://github.com/nodejs/node/pull/16438 Fixes: https://github.com/nodejs/node/issues/16437 Ref: https://github.com/nodejs/node/pull/15148 Reviewed-By: Gibson Fahnestock Reviewed-By: Richard Lau Reviewed-By: Gireesh Punathil Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Daijiro Wachi Reviewed-By: Michael Dawson --- tools/install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/install.py b/tools/install.py index 131f5be8833afc..5abcde49c16a2d 100755 --- a/tools/install.py +++ b/tools/install.py @@ -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):