Merge pull request #9 from gregory90/fix-for-private-registries

fixes #8
This commit is contained in:
Brad Rydzewski 2015-10-26 13:26:02 -07:00
commit b6573eabca

View File

@ -40,7 +40,7 @@ func main() {
// in case someone uses the shorthand repository name
// with a custom registry, we should concatinate so that
// we have the fully qualified image name.
if strings.Count(vargs.Repo, "/") == 1 && len(vargs.Registry) != 0 {
if strings.Count(vargs.Repo, "/") <= 1 && len(vargs.Registry) != 0 && !strings.HasPrefix(vargs.Repo, vargs.Registry) {
vargs.Repo = fmt.Sprintf("%s/%s", vargs.Registry, vargs.Repo)
}