diff --git a/plugins/repo/src/subcommands/purge-cache/purge-cache.go b/plugins/repo/src/subcommands/purge-cache/purge-cache.go index bf1998e42..6a39cde85 100644 --- a/plugins/repo/src/subcommands/purge-cache/purge-cache.go +++ b/plugins/repo/src/subcommands/purge-cache/purge-cache.go @@ -21,12 +21,12 @@ func main() { } cacheDir := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName, "cache"}, "/") - cacheDirOnHost := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT_ON_HOST"), appName, "cache"}, "/") + cacheHostDir := strings.Join([]string{common.MustGetEnv("DOKKU_HOST_ROOT"), appName, "cache"}, "/") dokkuGlobalRunArgs := common.MustGetEnv("DOKKU_GLOBAL_RUN_ARGS") image := common.GetDeployingAppImageName(appName, "", "") if info, _ := os.Stat(cacheDir); info != nil && info.IsDir() { purgeCacheCmd := common.NewShellCmd(strings.Join([]string{"docker run --rm", dokkuGlobalRunArgs, - "-v", strings.Join([]string{cacheDirOnHost, ":/cache"}, ""), image, + "-v", strings.Join([]string{cacheHostDir, ":/cache"}, ""), image, `find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} ;`}, " ")) purgeCacheCmd.Execute() err := os.MkdirAll(cacheDir, 0644)