File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export class NpmInstallationManager implements INpmInstallationManager {
43
43
public addToCache ( packageName : string , version : string ) : IFuture < void > {
44
44
return ( ( ) => {
45
45
let cachedPackagePath = this . getCachedPackagePath ( packageName , version ) ;
46
- if ( ! this . $fs . exists ( cachedPackagePath ) . wait ( ) ) {
46
+ if ( ! this . $fs . exists ( cachedPackagePath ) . wait ( ) || ! this . $fs . exists ( path . join ( cachedPackagePath , "framework" ) ) . wait ( ) ) {
47
47
this . addToCacheCore ( packageName , version ) . wait ( ) ;
48
48
}
49
49
@@ -155,6 +155,10 @@ export class NpmInstallationManager implements INpmInstallationManager {
155
155
this . npmInstall ( packageName , pathToSave , version ) . wait ( ) ;
156
156
let pathToNodeModules = path . join ( pathToSave , "node_modules" ) ;
157
157
let folders = this . $fs . readDirectory ( pathToNodeModules ) . wait ( ) ;
158
+
159
+ let data = this . $fs . readJson ( path . join ( pathToNodeModules , folders [ 0 ] , "package.json" ) ) . wait ( ) ;
160
+ this . addToCache ( data . name , data . version ) . wait ( ) ;
161
+
158
162
return path . join ( pathToNodeModules , folders [ 0 ] ) ;
159
163
}
160
164
return this . $options . frameworkPath ;
You can’t perform that action at this time.
0 commit comments