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
Prev Previous commit
Next Next commit
Update scripts_update_config_v2.go
  • Loading branch information
purush7 authored Dec 15, 2020
commit 62cd1449d64117e4007be823c1eac4b35b5fe95d
4 changes: 2 additions & 2 deletions cli/commands/scripts_update_config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ 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) {
if f, _ := os.Stat(filepath.Join(ec.MigrationDir, "metadata.yaml")); f != nil {
err = os.Remove(filepath.Join(ec.MigrationDir, "metadata.yaml"))
if err != nil {
ec.Logger.Warnln("Warning: cannot remove metadata.yaml file")
ec.Logger.Warnln("Warning: cannot remove metadata.yaml file ",err)
}
}

Expand Down