diff --git a/lib/config/presets/index.spec.ts b/lib/config/presets/index.spec.ts index 49e052eb0f7a59..71563487ef8a29 100644 --- a/lib/config/presets/index.spec.ts +++ b/lib/config/presets/index.spec.ts @@ -407,6 +407,15 @@ describe('config/presets/index', () => { presetSource: 'local', }); }); + it('parses local with spaces', () => { + expect(presets.parsePreset('local>A2B CD/A2B_Renovate')).toEqual({ + packageName: 'A2B CD/A2B_Renovate', + params: undefined, + presetName: 'default', + presetPath: undefined, + presetSource: 'local', + }); + }); it('parses local with subdirectory', () => { expect( presets.parsePreset('local>some-group/some-repo//some-dir/some-file') diff --git a/lib/config/presets/index.ts b/lib/config/presets/index.ts index 7ede0fc37ae336..16a39c1ac17941 100644 --- a/lib/config/presets/index.ts +++ b/lib/config/presets/index.ts @@ -40,7 +40,7 @@ const nonScopedPresetWithSubdirRegex = regEx( /^(?~?[\w\-./]+?)\/\/(?:(?[\w\-./]+)\/)?(?[\w\-.]+)(?:#(?[\w\-.]+?))?$/ ); const gitPresetRegex = regEx( - /^(?[\w\-./]+)(?::(?[\w-./]+\/))?(?::?(?[\w\-.+]+))?(?:#(?[\w\-.]+?))?$/ + /^(?[\w\-. /]+)(?::(?[\w-./]+\/))?(?::?(?[\w\-.+]+))?(?:#(?[\w\-.]+?))?$/ ); export function replaceArgs(