mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
Merge pull request #511 from c9s/narumi/mkdir-build
build: mkdir if dir not exists
This commit is contained in:
commit
ed57ae6eb9
|
@ -129,6 +129,13 @@ func BuildTarget(ctx context.Context, userConfig *Config, target BuildTargetConf
|
|||
buildDir = "build"
|
||||
}
|
||||
|
||||
if _, err := os.Stat(buildDir); os.IsNotExist(err) {
|
||||
err = os.Mkdir(buildDir, 0777)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
buildDir = filepath.Join(userConfig.Build.BuildDir, target.Name)
|
||||
return Build(ctx, userConfig, target)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user