Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Remove metadata.yaml file from update-config-v2 in migrations folder (#fixes 6112) #6121

Closed
wants to merge 10 commits into from
8 changes: 8 additions & 0 deletions cli/commands/scripts_update_config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@ func newScriptsUpdateConfigV2Cmd(ec *cli.ExecutionContext) *cobra.Command {
}
ec.Spinner.Stop()
ec.Logger.Infoln("Updated config to version 2")

if _, err = os.Stat(filepath.Join(ec.MigrationDir, "metadata.yaml")); err == nil || os.IsExist(err) {
purush7 marked this conversation as resolved.
Show resolved Hide resolved
err = os.Remove(filepath.Join(ec.MigrationDir, "metadata.yaml"))
if err != nil {
ec.Logger.Warnln("Warning: cannot remove metadata.yaml file")
}
}

return nil
},
}
Expand Down