Skip to content

Commit

Permalink
fix case where no kubectl context is set
Browse files Browse the repository at this point in the history
  • Loading branch information
nkubala committed Oct 2, 2018
1 parent ad8e298 commit 56b26d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/skaffold/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ func NewForConfig(opts *config.SkaffoldOptions, cfg *config.SkaffoldConfig) (*Sk
if err != nil {
return nil, errors.Wrap(err, "retrieving global config")
}
defaultRepo := ""
if globalConfig != nil {
defaultRepo = globalConfig.DefaultRepo
}

tagger, err := getTagger(cfg.Build.TagPolicy, opts.CustomTag)
if err != nil {
Expand All @@ -82,7 +86,7 @@ func NewForConfig(opts *config.SkaffoldOptions, cfg *config.SkaffoldConfig) (*Sk
return nil, errors.Wrap(err, "parsing skaffold build config")
}

deployer, err := getDeployer(&cfg.Deploy, kubeContext, opts.Namespace, globalConfig.DefaultRepo)
deployer, err := getDeployer(&cfg.Deploy, kubeContext, opts.Namespace, defaultRepo)
if err != nil {
return nil, errors.Wrap(err, "parsing skaffold deploy config")
}
Expand Down

0 comments on commit 56b26d9

Please sign in to comment.