Skip to content

Commit df7012f

Browse files
committedDec 8, 2016
Fix composeWith to allow passing explicit arguments for yeoman-generator@<1.0
1 parent 9aa4e02 commit df7012f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎lib/index.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,16 @@ Base.prototype.composeWith = function composeWith(modulePath, options) {
487487
var Generator = require(modulePath);
488488
Generator.resolved = require.resolve(modulePath);
489489
Generator.namespace = this.env.namespace(modulePath);
490-
generator = this.env.instantiate(Generator, {options: options});
490+
generator = this.env.instantiate(Generator, {
491+
options: options,
492+
arguments: options.arguments
493+
});
491494
} catch (err) {
492495
if (err.code === 'MODULE_NOT_FOUND') {
493-
generator = this.env.create(modulePath, {options: options});
496+
generator = this.env.create(modulePath, {
497+
options: options,
498+
arguments: options.arguments
499+
});
494500
} else {
495501
throw err;
496502
}

1 commit comments

Comments
 (1)

mischah commented on Dec 8, 2016

@mischah
Member

👌

Please sign in to comment.