Validate config before document pull

* invoke EnsureComplete before document pull to make sure
  all expected sections (cluster, context, authinfo, currentcontext)
  of config are present

Change-Id: If2ef4611cddc6ae96797dc26675551ef81ca8768
Closes: #215
This commit is contained in:
Yasin, Siraj (SY495P) 2020-05-14 14:56:00 -05:00
parent aab8325af5
commit 007e36281e

View File

@ -27,6 +27,9 @@ type Settings struct {
// Pull clones repositories
func (s *Settings) Pull() error {
if err := s.Config.EnsureComplete(); err != nil {
return err
}
err := s.cloneRepositories()
if err != nil {
return err