mirror of
https://github.com/mappu/miqt.git
synced 2025-05-10 21:50:21 +00:00
miqt-docker: create local GOCACHE/GOMODCACHE if they do not yet exist
This commit is contained in:
parent
540b306715
commit
e7892c780e
@ -132,6 +132,8 @@ func main() {
|
|||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
if gomodcache_sz := strings.TrimSpace(string(gomodcache)); len(gomodcache_sz) > 0 {
|
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`)
|
fullCommand = append(fullCommand, `-v`, gomodcache_sz+`:/go/pkg/mod`, `-e`, `GOMODCACHE=/go/pkg/mod`)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,6 +142,8 @@ func main() {
|
|||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
if gocache_sz := strings.TrimSpace(string(gocache)); len(gocache_sz) > 0 {
|
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`)
|
fullCommand = append(fullCommand, `-v`, gocache_sz+`:/.cache/go-build`, `-e`, `GOCACHE=/.cache/go-build`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user