File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -137,13 +137,21 @@ export class NpmInstallationManager implements INpmInstallationManager {
137
137
return ( ( ) : boolean => {
138
138
let shasumProperty = "dist.shasum" ;
139
139
let cachedPackagePath = this . getCachedPackagePath ( packageName , version ) ;
140
- let realShasum = this . $npm . view ( `${ packageName } @${ version } ` , shasumProperty ) . wait ( ) [ version ] [ shasumProperty ] ;
140
+ let packageInfo = this . $npm . view ( `${ packageName } @${ version } ` , shasumProperty ) . wait ( ) ;
141
+
142
+ if ( _ . isEmpty ( packageInfo ) ) {
143
+ // this package has not been published to npmjs.org yet - perhaps manually added via --framework-path
144
+ this . $logger . trace ( `Checking shasum of package ${ packageName } @${ version } : skipped because the package was not found in npmjs.org` ) ;
145
+ return true ;
146
+ }
147
+
148
+ let realShasum = packageInfo [ version ] [ shasumProperty ] ;
141
149
let packageTgz = cachedPackagePath + ".tgz" ;
142
150
let currentShasum = "" ;
143
151
if ( this . $fs . exists ( packageTgz ) . wait ( ) ) {
144
152
currentShasum = this . $fs . getFileShasum ( packageTgz ) . wait ( ) ;
145
153
}
146
- this . $logger . trace ( `Checking shasum of package: ${ packageName } @${ version } : expected ${ realShasum } , actual ${ currentShasum } .` ) ;
154
+ this . $logger . trace ( `Checking shasum of package ${ packageName } @${ version } : expected ${ realShasum } , actual ${ currentShasum } .` ) ;
147
155
return realShasum === currentShasum ;
148
156
} ) . future < boolean > ( ) ( ) ;
149
157
}
You can’t perform that action at this time.
0 commit comments