File tree 3 files changed +16
-2
lines changed
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) {
472
472
*/
473
473
474
474
Base . prototype . composeWith = function composeWith ( namespace , options , settings ) {
475
- settings = settings || { } ;
476
475
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 ) ;
477
488
478
489
if ( settings . local ) {
479
490
var Generator = require ( settings . local ) ;
Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ describe('Base', function () {
689
689
resolved : 'unknown' ,
690
690
namespace : 'dummy' ,
691
691
env : this . env ,
692
- 'skip-install' : true
692
+ skipInstall : true
693
693
} ) ;
694
694
695
695
this . spy = sinon . spy ( ) ;
@@ -706,6 +706,8 @@ describe('Base', function () {
706
706
setTimeout ( function ( ) {
707
707
this . dummy . run ( function ( ) {
708
708
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 ) ;
709
711
assert ( this . spy . calledAfter ( runSpy ) ) ;
710
712
done ( ) ;
711
713
} . bind ( this ) ) ;
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ describe('Base (actions/install mixin)', function () {
152
152
this . dummy . run ( ) ;
153
153
} ) ;
154
154
} ) ;
155
+
155
156
describe ( '#yarnInstall()' , function ( ) {
156
157
it ( 'spawn an install process once per commands' , function ( done ) {
157
158
this . dummy . yarnInstall ( ) ;
You can’t perform that action at this time.
0 commit comments