mirror of
https://github.com/beego/bee.git
synced 2025-06-12 04:50:40 +00:00
Load configuration for all commands
This removes the filepath.Walk() when loading configuration, as it can read a Beefile from another project in the $GOPATH. Now config.LoadConfig() is called for all available commands.
This commit is contained in:
@ -117,8 +117,6 @@ func scaffold(cmd *commands.Command, args []string, currpath string) {
|
||||
beeLogger.Log.Fatal("Wrong number of arguments. Run: bee help generate")
|
||||
}
|
||||
|
||||
config.LoadConfig()
|
||||
|
||||
cmd.Flag.Parse(args[2:])
|
||||
if generate.SQLDriver == "" {
|
||||
generate.SQLDriver = utils.DocValue(config.Conf.Database.Driver)
|
||||
@ -141,8 +139,6 @@ func scaffold(cmd *commands.Command, args []string, currpath string) {
|
||||
}
|
||||
|
||||
func appCode(cmd *commands.Command, args []string, currpath string) {
|
||||
config.LoadConfig()
|
||||
|
||||
cmd.Flag.Parse(args[1:])
|
||||
if generate.SQLDriver == "" {
|
||||
generate.SQLDriver = utils.DocValue(config.Conf.Database.Driver)
|
||||
|
Reference in New Issue
Block a user