Skip to content

Commit

Permalink
Merge pull request #907 from debasishbsws/traling-slash-667
Browse files Browse the repository at this point in the history
Remove Trailing `/` from the repository path
  • Loading branch information
Elizafox authored Oct 26, 2023
2 parents 67a4e34 + 418fdb8 commit ad826a8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/build/types/image_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package types
import (
"fmt"
"os"
"strings"

"github.com/jinzhu/copier"
"gopkg.in/yaml.v3"
Expand Down Expand Up @@ -86,6 +87,13 @@ func (ic *ImageConfiguration) parse(configData []byte, logger log.Logger) error
ic.Contents.Packages = pkgs
}

repos := make([]string, 0, len(ic.Contents.Repositories))
for _, repo := range ic.Contents.Repositories {
repo = strings.TrimRight(repo, "/")
repos = append(repos, repo)
}
ic.Contents.Repositories = repos

return nil
}

Expand Down

0 comments on commit ad826a8

Please sign in to comment.