mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Mkdir if dir not exists
This commit is contained in:
parent
6c20ec3c85
commit
4e2faacbae
|
@ -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