Skip to content

Commit

Permalink
fix: ensure metadata.name is set on loading an env
Browse files Browse the repository at this point in the history
  • Loading branch information
Duologic committed Nov 20, 2020
1 parent f16c942 commit 4ee8de7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/tanka/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ func load(path string, opts Opts) (*loaded, error) {
return nil, fmt.Errorf("no Tanka environment found")
}

if env.Metadata.Name == "" {
return nil, fmt.Errorf("Environment has no metadata.name set in %s", path)
}

if err := checkVersion(env.Spec.ExpectVersions.Tanka); err != nil {
return nil, err
}
Expand Down

0 comments on commit 4ee8de7

Please sign in to comment.