Skip to content

Commit

Permalink
fix corner case where no config values are set
Browse files Browse the repository at this point in the history
  • Loading branch information
nkubala committed Oct 2, 2018
1 parent 8fe8208 commit 7261ee0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/skaffold/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ func NewForConfig(opts *config.SkaffoldOptions, cfg *latest.SkaffoldConfig) (*Sk
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 {
return nil, errors.Wrap(err, "parsing skaffold tag config")
Expand All @@ -82,7 +87,7 @@ func NewForConfig(opts *config.SkaffoldOptions, cfg *latest.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 7261ee0

Please sign in to comment.