+
Skip to content

Conversation

drewblas
Copy link
Contributor

Typically, the https://registry.terraform.io/.well-known/terraform.json returns {"modules.v1":"/v1/modules/","providers.v1":"/v1/providers/"}

If instead, a custom registry returns no trailing slash, like `{"modules.v1":"/v1/modules","providers.v1":"/v1/providers"}
Then we'd fetch URLs mashing together the path with the module name. This fixes that, akin to hashicorp/terraform@34b4000

@drewblas drewblas requested a review from aliscott May 28, 2025 19:18
}
if !strings.HasSuffix(serviceURL.Path, "/") {
serviceURL.Path += "/"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this second one a lot, not totally sure it's necessary, I think the resolver below was actually already account for mashing two paths together correctly. But included this anyway for consistency

@drewblas drewblas merged commit 9089480 into master May 28, 2025
7 of 10 checks passed
@drewblas drewblas deleted the add-trailing-registry-slash branch May 28, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载