提交 cb3e2f33 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

fix load config and zip results issues for unittest

上级 cdc464e6
......@@ -245,11 +245,16 @@ func GetWorkDir() string { // where we run file in
}
func GetZTFDir() (dir string) { // where ztf exe file in
exeDir, _ := os.Executable()
if commonUtils.IsRelease() { // release
dir, _ = os.Executable()
dir = filepath.Dir(dir)
} else { // debug
dir = GetWorkDir()
dir = filepath.Dir(exeDir)
} else { // debug mode
if strings.Index(strings.ToLower(exeDir), "goland") > -1 { // run with ide
dir = os.Getenv("ZTF_CODE_DIR")
} else {
dir = GetWorkDir()
}
}
dir, _ = filepath.Abs(dir)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册