From e7892c780e80d8d8ebbe852b53f3527e594e1d6d Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 26 Apr 2025 17:22:53 +1200 Subject: [PATCH] miqt-docker: create local GOCACHE/GOMODCACHE if they do not yet exist --- cmd/miqt-docker/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/miqt-docker/main.go b/cmd/miqt-docker/main.go index 6a8cb69f..fde85258 100644 --- a/cmd/miqt-docker/main.go +++ b/cmd/miqt-docker/main.go @@ -132,6 +132,8 @@ func main() { log.Panic(err) } if gomodcache_sz := strings.TrimSpace(string(gomodcache)); len(gomodcache_sz) > 0 { + _ = os.MkdirAll(gomodcache_sz, 0755) // Might not exist if no Go modules have been used yet + fullCommand = append(fullCommand, `-v`, gomodcache_sz+`:/go/pkg/mod`, `-e`, `GOMODCACHE=/go/pkg/mod`) } @@ -140,6 +142,8 @@ func main() { log.Panic(err) } if gocache_sz := strings.TrimSpace(string(gocache)); len(gocache_sz) > 0 { + _ = os.MkdirAll(gocache_sz, 0755) // Might not exist if no Go packages have been built yet + fullCommand = append(fullCommand, `-v`, gocache_sz+`:/.cache/go-build`, `-e`, `GOCACHE=/.cache/go-build`) }