Fail early if chart or release is missing

This commit is contained in:
Erin Call
2019-12-16 16:55:54 -08:00
parent e4fa70239e
commit 1560c05100
3 changed files with 28 additions and 1 deletions

View File

@@ -26,6 +26,13 @@ func (u *Upgrade) Execute(_ Config) error {
// Prepare gets the Upgrade ready to execute.
func (u *Upgrade) Prepare(cfg Config) error {
if u.Chart == "" {
return fmt.Errorf("chart is required")
}
if u.Release == "" {
return fmt.Errorf("release is required")
}
args := []string{"--kubeconfig", cfg.KubeConfig}
if cfg.Namespace != "" {