Skip to content

Commit

Permalink
Use viper.UnmarshalKey for slices because of spf13/viper#380
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergesundheit committed Mar 6, 2024
1 parent ba7d20d commit 7547e43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/helm-schema/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,20 @@ func worker(
func exec(cmd *cobra.Command, _ []string) error {
configureLogging()

var skipAutoGeneration, valueFileNames []string

chartSearchRoot := viper.GetString("chart-search-root")
dryRun := viper.GetBool("dry-run")
noDeps := viper.GetBool("no-dependencies")
keepFullComment := viper.GetBool("keep-full-comment")
outFile := viper.GetString("output-file")
valueFileNames := viper.GetStringSlice("value-files")
dontRemoveHelmDocsPrefix := viper.GetBool("dont-strip-helm-docs-prefix")
skipAutoGeneration := viper.GetStringSlice("skip-auto-generation")
if err := viper.UnmarshalKey("value-files", &valueFileNames); err != nil {
return err
}
if err := viper.UnmarshalKey("skip-auto-generation", &skipAutoGeneration); err != nil {
return err
}
workersCount := runtime.NumCPU() * 2

// 1. Start a producer that searches Chart.yaml and values.yaml files
Expand Down

0 comments on commit 7547e43

Please sign in to comment.