From 42107c2b8b5ec84cebe7c464078f1ad788b6ecf0 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 19 Mar 2019 15:30:01 +0100 Subject: [PATCH] CachePath: only create base path --- packer/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer/cache.go b/packer/cache.go index eac2835fc..958a2367b 100644 --- a/packer/cache.go +++ b/packer/cache.go @@ -23,7 +23,7 @@ var DefaultCacheDir = "packer_cache" func CachePath(paths ...string) (path string, err error) { defer func() { // create the dir based on return path it it doesn't exist - os.MkdirAll(path, os.ModePerm) + os.MkdirAll(filepath.Base(path), os.ModePerm) }() cacheDir := DefaultCacheDir if cd := os.Getenv("PACKER_CACHE_DIR"); cd != "" {