Skip to content

Commit

Permalink
Revert "dont use pointer"
Browse files Browse the repository at this point in the history
This reverts commit 40cea11.
  • Loading branch information
kevjt committed Sep 26, 2024
1 parent 40cea11 commit 5e8a321
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/helm-migrate-values/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ func NewRootCmd(actionConfig *action.Configuration, settings *cli.EnvSettings, o
var migrationDir string
flags.StringVar(&migrationDir, "migration-dir", "value-migrations", "Specifies the relative path to the directory containing migration definition files. The path should be relative to the Helm chart directory.")

runner := newRunner(actionConfig, flags, settings, out, migrationDir, &outputFile, log)
runner := newRunner(actionConfig, flags, settings, out, &migrationDir, &outputFile, log)
cmd.RunE = runner

return cmd, nil
}

func newRunner(actionConfig *action.Configuration, flags *pflag.FlagSet, settings *cli.EnvSettings, out io.Writer, migrationDir string, outputFile *string, log pkg.Logger) func(cmd *cobra.Command, args []string) error {
func newRunner(actionConfig *action.Configuration, flags *pflag.FlagSet, settings *cli.EnvSettings, out io.Writer, migrationDir *string, outputFile *string, log pkg.Logger) func(cmd *cobra.Command, args []string) error {
// We use the install action for locating the chart
var installAction = action.NewInstall(actionConfig)
var listAction = action.NewList(actionConfig)
Expand Down Expand Up @@ -130,7 +130,7 @@ func newRunner(actionConfig *action.Configuration, flags *pflag.FlagSet, setting
return fmt.Errorf("failed to extract major version from chart version: %s", release.Chart.Metadata.Version)
}
relMajorVer, _ := strconv.Atoi(matches[1])
migrationsPath := filepath.Join(*chartDir, migrationDir)
migrationsPath := filepath.Join(*chartDir, *migrationDir)

// vTo is always nil, because it really only makes sense to migrate to the current chart version.
// The migrations library does support migrating to a specific version though.
Expand Down

0 comments on commit 5e8a321

Please sign in to comment.