Skip to content

Commit 1f9fbe9

Browse files
authored
fix(config): don't allow a platform-specific config filename for local platform (#41303)
As this currently does not make sense. This may be revisited as part of #40970.
1 parent f9d141f commit 1f9fbe9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

lib/config/app-strings.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@ describe('config/app-strings', () => {
2525
getConfigFileNames('github').includes('.github/renovate.json'),
2626
).toBeTrue();
2727
});
28+
29+
it('does not allow the local platform to have an associated filename', () => {
30+
const filenames = getConfigFileNames('local');
31+
32+
expect(filenames.includes('.local/renovate.json')).toBeFalse();
33+
expect(filenames).toEqual([
34+
'renovate.json',
35+
'renovate.json5',
36+
'.renovaterc',
37+
'.renovaterc.json',
38+
'.renovaterc.json5',
39+
'package.json',
40+
]);
41+
});
2842
});

lib/config/app-strings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function getConfigFileNames(platform?: PlatformId): string[] {
3737
return false;
3838
});
3939

40-
if (!['github', 'gitlab'].includes(platform)) {
40+
if (!['github', 'gitlab'].includes(platform) && platform !== 'local') {
4141
filteredConfigFileNames.push(`.${platform}/renovate.json`);
4242
filteredConfigFileNames.push(`.${platform}/renovate.json5`);
4343
}

0 commit comments

Comments
 (0)