Skip to content

Commit

Permalink
fix(presets): allow spaces in repo names (#12726)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Nov 17, 2021
1 parent 4f2b3c8 commit 55d3c04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/config/presets/index.spec.ts
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion lib/config/presets/index.ts
Expand Up @@ -40,7 +40,7 @@ const nonScopedPresetWithSubdirRegex = regEx(
/^(?<packageName>~?[\w\-./]+?)\/\/(?:(?<presetPath>[\w\-./]+)\/)?(?<presetName>[\w\-.]+)(?:#(?<packageTag>[\w\-.]+?))?$/
);
const gitPresetRegex = regEx(
/^(?<packageName>[\w\-./]+)(?::(?<presetPath>[\w-./]+\/))?(?::?(?<presetName>[\w\-.+]+))?(?:#(?<packageTag>[\w\-.]+?))?$/
/^(?<packageName>[\w\-. /]+)(?::(?<presetPath>[\w-./]+\/))?(?::?(?<presetName>[\w\-.+]+))?(?:#(?<packageTag>[\w\-.]+?))?$/
);

export function replaceArgs(
Expand Down

0 comments on commit 55d3c04

Please sign in to comment.