File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,13 @@ function deepMerge(target: any, source: any): any {
186
186
const targetVal = target [ key ] ;
187
187
const sourceVal = source [ key ] ;
188
188
if ( Array . isArray ( targetVal ) && Array . isArray ( sourceVal ) ) {
189
- output [ key ] = [ ...targetVal , ...sourceVal ] ;
189
+ // Deduplicate args/ignoreDefaultArgs, prefer source values
190
+ output [ key ] = [ ...new Set ( [
191
+ ...( key === 'args' || key === 'ignoreDefaultArgs' ?
192
+ targetVal . filter ( ( arg : string ) => ! sourceVal . some ( ( launchArg : string ) => arg . startsWith ( '--' ) && launchArg . startsWith ( arg . split ( '=' ) [ 0 ] ) ) ) :
193
+ targetVal ) ,
194
+ ...sourceVal
195
+ ] ) ] ;
190
196
} else if ( sourceVal instanceof Object && key in target ) {
191
197
output [ key ] = deepMerge ( targetVal , sourceVal ) ;
192
198
} else {
You can’t perform that action at this time.
0 commit comments