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(
89
89
"-D,--define <entry...>" ,
90
90
"Define cache variables passed when configuring projects" ,
91
91
)
92
- . argParser < Record < string , string > [ ] > ( ( input , previous = [ ] ) => {
92
+ . argParser < Record < string , string > [ ] > ( ( input , previous ) => {
93
93
// TODO: Implement splitting of value using a regular expression (using named groups) for the format <var>[:<type>]=<value>
94
94
// and return an object keyed by variable name with the string value as value or alternatively an array of [value, type]
95
95
const match = input . match (
@@ -101,7 +101,8 @@ const defineOption = new Option(
101
101
) ;
102
102
}
103
103
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 ;
105
106
} )
106
107
. default ( [ ] ) ;
107
108
You can’t perform that action at this time.
0 commit comments