mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +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"
|
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)
|
buildDir = filepath.Join(userConfig.Build.BuildDir, target.Name)
|
||||||
return Build(ctx, userConfig, target)
|
return Build(ctx, userConfig, target)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user