diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-07-11 04:53:58 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-07-17 18:49:10 +0300 |
commit | 62779ae195e190bee6fb8ef1c1d495ae3e8f7949 (patch) | |
tree | 7fc759e4bd161baa089c3b3b8212ed6df32a4ad4 /tools/install.py | |
parent | 24f43903b4a2f5aa73a99e6f3d4cc62d559cf94b (diff) |
build: add npx to installers
PR-URL: https://github.com/nodejs/node/pull/14235
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools/install.py')
-rwxr-xr-x | tools/install.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/install.py b/tools/install.py index d51ac06d7b1..afebb60e994 100755 --- a/tools/install.py +++ b/tools/install.py @@ -98,6 +98,15 @@ def npm_files(action): else: assert(0) # unhandled action type + # create/remove symlink + link_path = abspath(install_path, 'bin/npx') + if action == uninstall: + action([link_path], 'bin/npx') + elif action == install: + try_symlink('../lib/node_modules/npm/bin/npx-cli.js', link_path) + else: + assert(0) # unhandled action type + def subdir_files(path, dest, action): ret = {} for dirpath, dirnames, filenames in os.walk(path): |