mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
let build config and legacy imports co-exists
This commit is contained in:
parent
5329ef8f25
commit
45876968d9
|
@ -194,11 +194,8 @@ func LoadBuildConfig(configFile string) (*Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// for backward compatible
|
// for backward compatible
|
||||||
|
if config.Build == nil {
|
||||||
if len(config.Imports) > 0 {
|
if len(config.Imports) > 0 {
|
||||||
if config.Build != nil {
|
|
||||||
return nil, fmt.Errorf("the legacy imports is defined, which conflics with the build configuration")
|
|
||||||
}
|
|
||||||
|
|
||||||
config.Build = &BuildConfig{
|
config.Build = &BuildConfig{
|
||||||
BuildDir: "build",
|
BuildDir: "build",
|
||||||
Imports: config.Imports,
|
Imports: config.Imports,
|
||||||
|
@ -208,6 +205,7 @@ func LoadBuildConfig(configFile string) (*Config, error) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return &config, nil
|
return &config, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user