Merge pull request #464 from aofei/GOBIN
build: ensure GOBIN directory exists before use
This commit is contained in:
@@ -79,6 +79,9 @@ func NewDefaultConf(mode Mode) *Config {
|
|||||||
}
|
}
|
||||||
bin = filepath.Join(gopath, "bin")
|
bin = filepath.Join(gopath, "bin")
|
||||||
}
|
}
|
||||||
|
if err := os.MkdirAll(bin, 0755); err != nil {
|
||||||
|
panic(fmt.Errorf("cannot create bin directory: %v", err))
|
||||||
|
}
|
||||||
conf := &Config{
|
conf := &Config{
|
||||||
BinPath: bin,
|
BinPath: bin,
|
||||||
Mode: mode,
|
Mode: mode,
|
||||||
|
|||||||
Reference in New Issue
Block a user