From 3aa0e51104e920c65b0b0bcf82fe2fbb91f116bc Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 28 Mar 2019 13:17:15 -0700 Subject: [PATCH] I use Dir instead of Base for mkdirall call --- packer/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packer/cache.go b/packer/cache.go index 958a2367b..b2be017fe 100644 --- a/packer/cache.go +++ b/packer/cache.go @@ -22,8 +22,8 @@ var DefaultCacheDir = "packer_cache" // PACKER_CACHE_DIR="/home/there" CacheDir("foo", "bar") => "/home/there/foo/bar func CachePath(paths ...string) (path string, err error) { defer func() { - // create the dir based on return path it it doesn't exist - os.MkdirAll(filepath.Base(path), os.ModePerm) + // create the dir based on return path if it doesn't exist + os.MkdirAll(filepath.Dir(path), os.ModePerm) }() cacheDir := DefaultCacheDir if cd := os.Getenv("PACKER_CACHE_DIR"); cd != "" {