Skip to content

Commit

Permalink
Apply suggested change
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Therapy <sam@samtherapy.net>
  • Loading branch information
SamTherapy committed Oct 21, 2022
1 parent 2e123a6 commit 303cf05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/pipe/defaults/defaults.go
Expand Up @@ -35,8 +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(ctx.Config.GiteaURLs.Download, "/")
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 {
Expand Down

0 comments on commit 303cf05

Please sign in to comment.