Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 2d727af

Browse files
author
Matthieu Nottale
committed
Helm: propagate render changes.
Signed-off-by: Matthieu Nottale <[email protected]>
1 parent 35ebdec commit 2d727af

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

cmd/helm.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"os"
66
"strings"
77

8+
"github.com/docker/lunchbox/internal"
89
"github.com/docker/lunchbox/renderer"
910
"github.com/spf13/cobra"
1011
)
@@ -18,7 +19,11 @@ var helmCmd = &cobra.Command{
1819
for _, v := range helmEnv {
1920
kv := strings.SplitN(v, "=", 2)
2021
if len(kv) != 2 {
21-
fmt.Printf("Malformed env input: '%s'\n", v)
22+
fmt.Printf("Missing '=' in setting '%s', expected KEY=VALUE\n", v)
23+
os.Exit(1)
24+
}
25+
if _, ok := d[kv[0]]; ok {
26+
fmt.Printf("Duplicate command line setting: '%s'\n", kv[0])
2227
os.Exit(1)
2328
}
2429
d[kv[0]] = kv[1]
@@ -37,7 +42,9 @@ var helmEnv []string
3742

3843
func init() {
3944
rootCmd.AddCommand(helmCmd)
40-
helmCmd.Flags().StringArrayVarP(&helmComposeFiles, "compose-files", "c", []string{}, "Override Compose files")
41-
helmCmd.Flags().StringArrayVarP(&helmSettingsFile, "settings-files", "s", []string{}, "Override settings files")
42-
helmCmd.Flags().StringArrayVarP(&helmEnv, "env", "e", []string{}, "Override environment values")
45+
if internal.Experimental == "on" {
46+
helmCmd.Flags().StringArrayVarP(&helmComposeFiles, "compose-files", "c", []string{}, "Override Compose files")
47+
}
48+
helmCmd.Flags().StringArrayVarP(&helmSettingsFile, "settings-files", "f", []string{}, "Override settings files")
49+
helmCmd.Flags().StringArrayVarP(&helmEnv, "set", "s", []string{}, "Override environment values")
4350
}

0 commit comments

Comments
 (0)