Merge pull request #379 from trheyi/main

[fix] config init
This commit is contained in:
Max 2023-04-24 17:58:49 +08:00 committed by GitHub
commit f18ed4b44b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -23,7 +23,6 @@ var packCmd = &cobra.Command{
Long: L("Package the application into a single file"),
Run: func(cmd *cobra.Command, args []string) {
config.Init()
cfg := config.Conf
output, err := filepath.Abs(filepath.Join(cfg.Root, "dist"))
if err != nil {

View file

@ -145,7 +145,6 @@ func Execute() {
// Boot 设定配置
func Boot() {
config.Init()
root := config.Conf.Root
if appPath != "" {
r, err := filepath.Abs(appPath)

View file

@ -25,6 +25,10 @@ var LogOutput *os.File // 日志文件
// DSLExtensions the dsl file Extensions
var DSLExtensions = []string{"*.yao", "*.json", "*.jsonc"}
func init() {
Init()
}
// Init setting
func Init() {