Fix bincache on windows

This commit is contained in:
Fedor Korotkiy 2020-02-16 17:18:26 +03:00
parent 0e20dc105b
commit 57ab50a4a7

View file

@ -10,6 +10,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"runtime"
"sync" "sync"
) )
@ -107,5 +108,9 @@ func (c *ciBuildCache) GetBinary(importPath string) (string, error) {
func RandomName() string { func RandomName() string {
var raw [8]byte var raw [8]byte
_, _ = rand.Read(raw[:]) _, _ = rand.Read(raw[:])
return hex.EncodeToString(raw[:]) name := hex.EncodeToString(raw[:])
if runtime.GOOS == "windows" {
name += ".exe"
}
return name
} }