fix: allow renaming old applications to new format
0.22.0 changed allowed values for app names, making it more difficult for users to fix their app names - you need to either downgrade+rename or recreate the app. The `apps:rename` command can now rename these old applications to the new standard. Also drop some app name verification from internal commands. Duplicate verification doesn't help much, and though it isn't excessively slow, it does prevent us from running commands against old apps that exist. Refs #4267
This commit is contained in:
@@ -83,6 +83,17 @@ func destroyApp(appName string) error {
|
||||
|
||||
forceCleanup := true
|
||||
common.DockerCleanup(appName, forceCleanup)
|
||||
|
||||
// remove contents for apps that are symlinks to other folders
|
||||
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
// then remove the folder and/or the symlink
|
||||
if err := os.RemoveAll(common.AppRoot(appName)); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user