File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const defineOption = new Option(
8989 "-D,--define <entry...>" ,
9090 "Define cache variables passed when configuring projects" ,
9191)
92- . argParser < Record < string , string > [ ] > ( ( input , previous = [ ] ) => {
92+ . argParser < Record < string , string > [ ] > ( ( input , previous ) => {
9393 // TODO: Implement splitting of value using a regular expression (using named groups) for the format <var>[:<type>]=<value>
9494 // and return an object keyed by variable name with the string value as value or alternatively an array of [value, type]
9595 const match = input . match (
@@ -101,7 +101,8 @@ const defineOption = new Option(
101101 ) ;
102102 }
103103 const { name, type, value } = match . groups ;
104- return [ ...previous , { [ type ? `${ name } :${ type } ` : name ] : value } ] ;
104+ previous . push ( { [ type ? `${ name } :${ type } ` : name ] : value } ) ;
105+ return previous ;
105106 } )
106107 . default ( [ ] ) ;
107108
You can’t perform that action at this time.
0 commit comments