File tree 3 files changed +20
-0
lines changed
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,15 @@ def npm_files(action):
98
98
else :
99
99
assert (0 ) # unhandled action type
100
100
101
+ # create/remove symlink
102
+ link_path = abspath (install_path , 'bin/npx' )
103
+ if action == uninstall :
104
+ action ([link_path ], 'bin/npx' )
105
+ elif action == install :
106
+ try_symlink ('../lib/node_modules/npm/bin/npx-cli.js' , link_path )
107
+ else :
108
+ assert (0 ) # unhandled action type
109
+
101
110
def subdir_files (path , dest , action ):
102
111
ret = {}
103
112
for dirpath , dirnames , filenames in os .walk (path ):
Original file line number Diff line number Diff line change 95
95
Description =" !(loc.npm_Description)" >
96
96
<ComponentRef Id =" NpmCmdScript" />
97
97
<ComponentRef Id =" NpmBashScript" />
98
+ <ComponentRef Id =" NpxCmdScript" />
99
+ <ComponentRef Id =" NpxBashScript" />
98
100
<ComponentRef Id =" NpmConfigurationFile" />
99
101
<ComponentRef Id =" AppData" />
100
102
<ComponentGroupRef Id =" NpmSourceFiles" />
215
217
<File Id =" npm.sh" KeyPath =" yes" Source =" $(var.NpmSourceDir)\bin\npm" />
216
218
</Component >
217
219
220
+ <Component Id =" NpxCmdScript" >
221
+ <File Id =" npx.cmd" KeyPath =" yes" Source =" $(var.NpmSourceDir)\bin\npx.cmd" />
222
+ </Component >
223
+
224
+ <Component Id =" NpxBashScript" >
225
+ <File Id =" npx.sh" KeyPath =" yes" Source =" $(var.NpmSourceDir)\bin\npx" />
226
+ </Component >
227
+
218
228
<Directory Id =" NodeModulesFolder" Name =" node_modules" >
219
229
<Directory Id =" NpmFolder" Name =" npm" >
220
230
<Component Id =" NpmConfigurationFile" >
Original file line number Diff line number Diff line change 3
3
# TODO Can we extract $PREFIX from the installer?
4
4
cd /usr/local/bin
5
5
ln -sf ../lib/node_modules/npm/bin/npm-cli.js npm
6
+ ln -sf ../lib/node_modules/npm/bin/npx-cli.js npx
You can’t perform that action at this time.
0 commit comments