Skip to content

Commit

Permalink
Merge pull request #142 from listx/master
Browse files Browse the repository at this point in the history
ParseManifestsFromDir: improve filename handling
  • Loading branch information
k8s-ci-robot committed Oct 14, 2019
2 parents a86d619 + cd0825e commit e32056e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/dockerregistry/inventory.go
Expand Up @@ -224,9 +224,10 @@ func ParseManifestsFromDir(
return nil
}

// First try to parse the path as a manifest file. The only requirement
// is that the file must be named "promoter-manifest.yaml".
if !strings.HasSuffix(path, "/promoter-manifest.yaml") {
// First try to parse the path as a manifest file, which must be named
// "promoter-manifest.yaml". This restriction is in place to limit the
// scope of what is read in as a promoter manifest.
if filepath.Base(path) != "promoter-manifest.yaml" {
return nil
}

Expand Down

0 comments on commit e32056e

Please sign in to comment.