From bc0e9eb74e583430f083911b75da9e38c8cef2b2 Mon Sep 17 00:00:00 2001
From: Gordon <1432970085@qq.com>
Date: Mon, 1 Aug 2022 16:09:03 +0800
Subject: [PATCH 1/2] config file update

---
 pkg/common/config/config.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index 6c0e1a499..e773fc79b 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -511,13 +511,13 @@ type PDefaultTips struct {
 
 func init() {
 	cfgName := os.Getenv("CONFIG_NAME")
-	fmt.Println(Root, cfgName)
+	fmt.Println("GET IM CONFIG PATH :", Root, cfgName)
 
-	if len(cfgName) == 0 {
-		cfgName = Root + "/config/config.yaml"
+	if len(cfgName) != 0 {
+		Root = cfgName
 	}
 
-	bytes, err := ioutil.ReadFile(cfgName)
+	bytes, err := ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
 	if err != nil {
 		panic(err.Error())
 	}

From 6734c714d73630765badf8ed001fe658cd620128 Mon Sep 17 00:00:00 2001
From: Gordon <1432970085@qq.com>
Date: Mon, 1 Aug 2022 16:23:52 +0800
Subject: [PATCH 2/2] config file update

---
 pkg/common/config/config.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index 2825b816c..c018ce4c2 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -512,8 +512,7 @@ type PDefaultTips struct {
 
 func init() {
 	cfgName := os.Getenv("CONFIG_NAME")
-	fmt.Println("GET IM CONFIG PATH :", Root, cfgName)
-
+	fmt.Println("GET IM DEFAULT CONFIG PATH :", Root, "ENV PATH:", cfgName, b, filepath.Dir(b))
 	if len(cfgName) != 0 {
 		Root = cfgName
 	}