fix: test case issue

This commit is contained in:
Marvin Zhang
2024-11-19 17:40:44 +08:00
parent 3dc66e48db
commit 98a9c907c9
5 changed files with 47 additions and 40 deletions

View File

@@ -81,10 +81,15 @@ func IsPro() bool {
}
func GetWorkspace() string {
homedirPath, err := homedir.Dir()
if err != nil {
log.Warnf("cannot find home directory: %v", err)
return DefaultWorkspace
}
if res := viper.GetString("workspace"); res != "" {
return res
}
return DefaultWorkspace
return filepath.Join(homedirPath, DefaultWorkspace)
}
func GetTaskLogPath() string {