:fix(helm_repository): normalize both sides of the repo URL comparison (#1236)

helm stores repository URLs verbatim, so a repository registered with a
trailing slash keeps it in repositories.yaml. Only the URL coming from the
task was normalized, so a repository that already matched was reported as a
name conflict.

Fixes #1235
This commit is contained in:
Yuriy Novostavskiy
2026-09-15 10:26:49 -07:00
committed by GitHub
parent f42c78ce83
commit 094240ab77
3 changed files with 82 additions and 1 deletions
+1 -1
View File
@@ -331,7 +331,7 @@ def main():
insecure_skip_tls_verify,
)
changed = True
elif repository_status["url"] != repo_url:
elif repository_status["url"].rstrip("/") != repo_url:
module.fail_json(
msg="Repository already have a repository named {0}".format(repo_name)
)