diff --git a/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap b/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap index 61454159f84dc4e2ec951e4cc3b47f531a7379e3..ea3ede2331a95b35528ef55b499a9a24d9ef1bcd 100644 --- a/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap +++ b/lib/modules/manager/helmv3/__snapshots__/artifacts.spec.ts.snap @@ -496,7 +496,7 @@ exports[`modules/manager/helmv3/artifacts returns updated Chart.lock with docker exports[`modules/manager/helmv3/artifacts sets repositories from registryAliases 1`] = ` [ { - "cmd": "helm repo add stable the_stable_url --force-update", + "cmd": "helm repo add stable 'the stable_url' --force-update", "options": { "cwd": "/tmp/github/some/repo", "encoding": "utf-8", diff --git a/lib/modules/manager/helmv3/artifacts.spec.ts b/lib/modules/manager/helmv3/artifacts.spec.ts index 2a551f1c4b6898bf06ed1cedb40a9687be47b5ca..3ce9ba21ded27f4b4f83e1c512d173468968179c 100644 --- a/lib/modules/manager/helmv3/artifacts.spec.ts +++ b/lib/modules/manager/helmv3/artifacts.spec.ts @@ -593,7 +593,7 @@ describe('modules/manager/helmv3/artifacts', () => { config: { ...config, updateType: 'lockFileMaintenance', - registryAliases: { stable: 'the_stable_url', repo1: 'the_repo1_url' }, + registryAliases: { stable: 'the stable_url', repo1: 'the_repo1_url' }, }, }), ).toMatchObject([ diff --git a/lib/modules/manager/helmv3/artifacts.ts b/lib/modules/manager/helmv3/artifacts.ts index abc8e6887b65626b898185bf969d7abba3cb80ee..df8fe8ba0816ee484549b74910f5a91705e1fcf7 100644 --- a/lib/modules/manager/helmv3/artifacts.ts +++ b/lib/modules/manager/helmv3/artifacts.ts @@ -70,14 +70,14 @@ async function helmCommands( // add helm repos if an alias or credentials for the url are defined classicRepositories.forEach((value) => { const { username, password } = value.hostRule; - const parameters = [`${value.repository}`, `--force-update`]; + const parameters = [`${quote(value.repository)}`, `--force-update`]; const isPrivateRepo = username && password; if (isPrivateRepo) { parameters.push(`--username ${quote(username)}`); parameters.push(`--password ${quote(password)}`); } - cmd.push(`helm repo add ${value.name} ${parameters.join(' ')}`); + cmd.push(`helm repo add ${quote(value.name)} ${parameters.join(' ')}`); }); cmd.push(`helm dependency update ${quote(getParentDir(manifestPath))}`);