File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
src/server/typingsInstaller Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 22
33namespace ts . server . typingsInstaller {
44 const fs : {
5- appendFileSync ( file : string , content : string ) : void ;
6- existsSync ( path : string ) : boolean ;
5+ appendFileSync ( file : string , content : string ) : void
76 } = require ( "fs" ) ;
87
98 const path : {
@@ -33,12 +32,11 @@ namespace ts.server.typingsInstaller {
3332 /** Used if `--npmLocation` is not passed. */
3433 function getDefaultNPMLocation ( processName : string ) {
3534 if ( path . basename ( processName ) . indexOf ( "node" ) === 0 ) {
36- const npmPath = `"${ path . join ( path . dirname ( process . argv [ 0 ] ) , "npm" ) } "` ;
37- if ( fs . existsSync ( npmPath ) ) {
38- return npmPath ;
39- }
35+ return `"${ path . join ( path . dirname ( process . argv [ 0 ] ) , "npm" ) } "` ;
36+ }
37+ else {
38+ return "npm" ;
4039 }
41- return "npm" ;
4240 }
4341
4442 interface TypesRegistryFile {
You can’t perform that action at this time.
0 commit comments