File tree Expand file tree Collapse file tree 6 files changed +7
-13
lines changed
Expand file tree Collapse file tree 6 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ module.exports.handler = async function handler(argv) {
2020 let statsOnly = argv [ 'stats-only' ] ;
2121 let listCodemods = argv [ 'list-codemods' ] ;
2222 let createCustomDiff = argv [ 'create-custom-diff' ] ;
23- let blueprintOptions = argv [ '--' ] || [ ] ;
23+ let blueprintOptions = argv . _ . slice ( 0 ) ;
2424
2525 try {
2626 let message = await emberCliUpdate ( {
Original file line number Diff line number Diff line change @@ -14,14 +14,12 @@ module.exports.builder = {
1414 reset : args [ 'reset' ]
1515} ;
1616
17- module . exports . blueprintOptionsDefault = [ ] ;
18-
1917module . exports . handler = async function handler ( argv ) {
2018 let blueprint = argv [ 'blueprint' ] ;
2119 let to = argv [ 'to' ] ;
2220 let resolveConflicts = argv [ 'resolve-conflicts' ] ;
2321 let reset = argv [ 'reset' ] ;
24- let blueprintOptions = argv [ '--' ] || module . exports . blueprintOptionsDefault ;
22+ let blueprintOptions = argv . _ . slice ( 1 ) ;
2523
2624 try {
2725 let message = await init ( {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ module.exports.builder = {
1515module . exports . handler = async function handler ( argv ) {
1616 let blueprint = argv [ 'blueprint' ] ;
1717 let from = argv [ 'from' ] ;
18- let blueprintOptions = argv [ '--' ] || [ ] ;
18+ let blueprintOptions = argv . _ . slice ( 1 ) ;
1919
2020 try {
2121 await save ( {
Original file line number Diff line number Diff line change 44require ( 'yargs' )
55 . commandDir ( 'commands' )
66 . parserConfiguration ( {
7- 'populate--' : true
7+ 'populate--' : true ,
8+ 'collect-unknown-options' : true
89 } )
910 . argv ;
1011
Original file line number Diff line number Diff line change @@ -17,16 +17,13 @@ const resolvePackage = require('./resolve-package');
1717const {
1818 'to' : { default : toDefault }
1919} = require ( './args' ) ;
20- const {
21- blueprintOptionsDefault
22- } = require ( '../bin/commands/init' ) ;
2320
2421module . exports = async function init ( {
2522 blueprint : _blueprint ,
2623 to = toDefault ,
2724 resolveConflicts,
2825 reset,
29- blueprintOptions = blueprintOptionsDefault ,
26+ blueprintOptions = [ ] ,
3027 wasRunAsExecutable
3128} ) {
3229 let cwd = process . cwd ( ) ;
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ describe(function() {
9292 if ( from ) {
9393 args . push ( `--from=${ from } ` ) ;
9494 }
95- args = [ ...args , '--' , ...blueprintOptions ] ;
95+ args = [ ...args , ...blueprintOptions ] ;
9696
9797 return processBin ( {
9898 binFile : 'ember-cli-update' ,
@@ -587,7 +587,6 @@ describe(function() {
587587 'save' ,
588588 `-b=${ location } ` ,
589589 `--from=${ partial } ` ,
590- '--' ,
591590 ...options
592591 ] ,
593592 cwd : tmpPath ,
@@ -640,7 +639,6 @@ describe(function() {
640639 `-b=${ location } ` ,
641640 `--from=${ from } ` ,
642641 `--to=${ to } ` ,
643- '--' ,
644642 ...options
645643 ] ,
646644 cwd : tmpPath ,
You can’t perform that action at this time.
0 commit comments