mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-25 21:29:14 +02:00
fix: Trim trailing slash from Gitea URL (#3488)
This PR will truncate any trailing slash left by specifying only a Gitea API URL. Fixes #3487 I have not added any tests for this. Signed-off-by: Sam Therapy <sam@samtherapy.net> Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
f1e63050d6
commit
154c520755
@ -35,7 +35,7 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
return fmt.Errorf("templating Gitea API URL: %w", err)
|
||||
}
|
||||
|
||||
ctx.Config.GiteaURLs.Download = strings.ReplaceAll(apiURL, "/api/v1", "")
|
||||
ctx.Config.GiteaURLs.Download = strings.TrimSuffix(strings.ReplaceAll(apiURL, "/api/v1", ""), "/")
|
||||
}
|
||||
for _, defaulter := range defaults.Defaulters {
|
||||
if err := errhandler.Handle(defaulter.Default)(ctx); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user