Skip to content

Commit

Permalink
log instead of error when no config entry is found for particular con…
Browse files Browse the repository at this point in the history
…text
  • Loading branch information
nkubala committed Oct 2, 2018
1 parent 7261ee0 commit da7c2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/skaffold/app/cmd/config/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package config

import (
"fmt"
"io/ioutil"
"path/filepath"

Expand Down Expand Up @@ -96,7 +95,8 @@ func GetConfigForKubectx() (*ContextConfig, error) {
return contextCfg, nil
}
}
return nil, fmt.Errorf("no config entry found for kube-context %s", kubecontext)
logrus.Infof("no config entry found for kube-context %s", kubecontext)
return nil, nil
}

func getOrCreateConfigForKubectx() (*ContextConfig, error) {
Expand Down
4 changes: 4 additions & 0 deletions cmd/skaffold/app/cmd/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func newRunner(opts *config.SkaffoldOptions) (*runner.SkaffoldRunner, *latest.Sk
}

func applyDefaultRepoSubstitution(config *latest.SkaffoldConfig, globalConfig *configutil.ContextConfig) error {
if globalConfig == nil {
// noop
return nil
}
for _, artifact := range config.Build.Artifacts {
artifact.ImageName = util.SubstituteDefaultRepoIntoImage(globalConfig.DefaultRepo, artifact.ImageName)
}
Expand Down

0 comments on commit da7c2a5

Please sign in to comment.