File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -472,8 +472,19 @@ Base.prototype.run = function run(cb) {
472472 */
473473
474474Base . prototype . composeWith = function composeWith ( namespace , options , settings ) {
475- settings = settings || { } ;
476475 var generator ;
476+ settings = settings || { } ;
477+ options = options || { } ;
478+
479+ // Pass down the default options so they're correclty mirrored down the chain.
480+ options = _ . extend ( {
481+ options : _ . extend ( {
482+ skipInstall : this . options . skipInstall ,
483+ 'skip-install' : this . options . skipInstall ,
484+ skipCache : this . options . skipCache ,
485+ 'skip-cache' : this . options . skipCache
486+ } , options . options )
487+ } , options ) ;
477488
478489 if ( settings . local ) {
479490 var Generator = require ( settings . local ) ;
Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ describe('Base', function () {
689689 resolved : 'unknown' ,
690690 namespace : 'dummy' ,
691691 env : this . env ,
692- 'skip-install' : true
692+ skipInstall : true
693693 } ) ;
694694
695695 this . spy = sinon . spy ( ) ;
@@ -706,6 +706,8 @@ describe('Base', function () {
706706 setTimeout ( function ( ) {
707707 this . dummy . run ( function ( ) {
708708 sinon . assert . callOrder ( runSpy , this . spy ) ;
709+ assert . equal ( this . spy . thisValues [ 0 ] . options . skipInstall , true ) ;
710+ assert . equal ( this . spy . thisValues [ 0 ] . options [ 'skip-install' ] , true ) ;
709711 assert ( this . spy . calledAfter ( runSpy ) ) ;
710712 done ( ) ;
711713 } . bind ( this ) ) ;
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ describe('Base (actions/install mixin)', function () {
152152 this . dummy . run ( ) ;
153153 } ) ;
154154 } ) ;
155+
155156 describe ( '#yarnInstall()' , function ( ) {
156157 it ( 'spawn an install process once per commands' , function ( done ) {
157158 this . dummy . yarnInstall ( ) ;
You can’t perform that action at this time.
0 commit comments