[fix] config init
This commit is contained in:
parent
ce4aaf667f
commit
48415db96d
3 changed files with 4 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ var packCmd = &cobra.Command{
|
||||||
Long: L("Package the application into a single file"),
|
Long: L("Package the application into a single file"),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
config.Init()
|
|
||||||
cfg := config.Conf
|
cfg := config.Conf
|
||||||
output, err := filepath.Abs(filepath.Join(cfg.Root, "dist"))
|
output, err := filepath.Abs(filepath.Join(cfg.Root, "dist"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,6 @@ func Execute() {
|
||||||
// Boot 设定配置
|
// Boot 设定配置
|
||||||
func Boot() {
|
func Boot() {
|
||||||
|
|
||||||
config.Init()
|
|
||||||
root := config.Conf.Root
|
root := config.Conf.Root
|
||||||
if appPath != "" {
|
if appPath != "" {
|
||||||
r, err := filepath.Abs(appPath)
|
r, err := filepath.Abs(appPath)
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,10 @@ var LogOutput *os.File // 日志文件
|
||||||
// DSLExtensions the dsl file Extensions
|
// DSLExtensions the dsl file Extensions
|
||||||
var DSLExtensions = []string{"*.yao", "*.json", "*.jsonc"}
|
var DSLExtensions = []string{"*.yao", "*.json", "*.jsonc"}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
Init()
|
||||||
|
}
|
||||||
|
|
||||||
// Init setting
|
// Init setting
|
||||||
func Init() {
|
func Init() {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue