Merge pull request #464 from aofei/GOBIN

build: ensure GOBIN directory exists before use
This commit is contained in:
xushiwei
2024-07-08 12:23:01 +08:00
committed by GitHub

View File

@@ -79,6 +79,9 @@ func NewDefaultConf(mode Mode) *Config {
}
bin = filepath.Join(gopath, "bin")
}
if err := os.MkdirAll(bin, 0755); err != nil {
panic(fmt.Errorf("cannot create bin directory: %v", err))
}
conf := &Config{
BinPath: bin,
Mode: mode,