File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
lib/workers/global/config/parse Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -337,5 +337,16 @@ describe('workers/global/config/parse/index', () => {
337337 'customManagers:azurePipelinesVersions' ,
338338 ] ) ;
339339 } ) ;
340+
341+ it ( 'adds extends from fileConfig only' , async ( ) => {
342+ fileConfigParser . getConfig . mockResolvedValueOnce ( {
343+ extends : [ ':pinDigests' ] ,
344+ } ) ;
345+ const parsedConfig = await configParser . parseConfigs (
346+ defaultEnv ,
347+ defaultArgv ,
348+ ) ;
349+ expect ( parsedConfig . extends ) . toMatchObject ( [ ':pinDigests' ] ) ;
350+ } ) ;
340351 } ) ;
341352} ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ export async function parseConfigs(
5050
5151 let config : AllConfig = mergeChildConfig ( fileConfig , additionalFileConfig ) ;
5252 // merge extends from file config and additional file config
53- if ( is . nonEmptyArray ( fileConfig . extends ) ) {
53+ if (
54+ is . nonEmptyArray ( fileConfig . extends ) &&
55+ is . nonEmptyArray ( additionalFileConfig . extends )
56+ ) {
5457 config . extends = [ ...fileConfig . extends , ...( config . extends ?? [ ] ) ] ;
5558 }
5659 config = mergeChildConfig ( config , envConfig ) ;
You can’t perform that action at this time.
0 commit comments