refactor: get current dir

This commit is contained in:
debugtalk
2022-12-15 23:20:49 +08:00
parent 358b7dd685
commit ee68b954fb
14 changed files with 64 additions and 39 deletions

View File

@@ -13,6 +13,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/httprunner/httprunner/v4/hrp/internal/code"
"github.com/httprunner/httprunner/v4/hrp/internal/env"
"github.com/httprunner/httprunner/v4/hrp/internal/myexec"
"github.com/httprunner/httprunner/v4/hrp/internal/sdk"
)
@@ -163,5 +164,5 @@ func GetProjectRootDirPath(path string) (rootDir string, err error) {
// failed to locate project root dir
// maybe project plugin debugtalk.xx and proj.json are not exist
// use current dir instead
return os.Getwd()
return env.RootDir, nil
}