chore: use helper method

This commit is contained in:
Jose Diaz-Gonzalez committed 2020-11-21 20:57:33 -05:00
1 parent 34343a846d
commit c72bbf41ea
1 file changed
+2 -2
+2 -2
View File
@@ -16,8 +16,8 @@ func PurgeCache(appName string) error {
return err return err
} }
cacheDir := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName, "cache"}, "/") cacheDir := strings.Join([]string{common.AppRoot(appName), "cache"}, "/")
cacheHostDir := strings.Join([]string{common.MustGetEnv("DOKKU_HOST_ROOT"), appName, "cache"}, "/") cacheHostDir := strings.Join([]string{common.AppHostRoot(appName), "cache"}, "/")
dokkuGlobalRunArgs := common.MustGetEnv("DOKKU_GLOBAL_RUN_ARGS") dokkuGlobalRunArgs := common.MustGetEnv("DOKKU_GLOBAL_RUN_ARGS")
image := config.GetWithDefault(appName, "DOKKU_IMAGE", os.Getenv("DOKKU_IMAGE")) image := config.GetWithDefault(appName, "DOKKU_IMAGE", os.Getenv("DOKKU_IMAGE"))
if info, _ := os.Stat(cacheDir); info != nil && info.IsDir() { if info, _ := os.Stat(cacheDir); info != nil && info.IsDir() {