Skip to content

Commit

Permalink
fix: Trim trailing slash from Gitea URL
Browse files Browse the repository at this point in the history
Fixes #3487

Signed-off-by: Sam Therapy <sam@samtherapy.net>
  • Loading branch information
SamTherapy committed Oct 21, 2022
1 parent f28a70c commit b9177e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/pipe/defaults/defaults.go
Expand Up @@ -36,6 +36,7 @@ func (Pipe) Run(ctx *context.Context) error {
}

ctx.Config.GiteaURLs.Download = strings.ReplaceAll(apiURL, "/api/v1", "")
ctx.Config.GiteaURLs.Download = strings.TrimSuffix(apiURL, "/")
}
for _, defaulter := range defaults.Defaulters {
if err := errhandler.Handle(defaulter.Default)(ctx); err != nil {
Expand Down

0 comments on commit b9177e0

Please sign in to comment.