common/testing_common.go: Add verbosity for module-path find failure

for/master
Dustin Oprea 2020-01-11 17:38:44 -05:00
parent 817d4b2856
commit db9a0b3a24
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@ func GetModuleRootPath() string {
log.PanicIf(err)
currentPath := currentWd
visited := make([]string, 0)
for {
tryStampFilepath := path.Join(currentPath, ".MODULE_ROOT")
@ -38,9 +39,11 @@ func GetModuleRootPath() string {
break
}
visited = append(visited, tryStampFilepath)
currentPath = path.Dir(currentPath)
if currentPath == "/" {
log.Panicf("could not find module-root")
log.Panicf("could not find module-root: %v", visited)
}
}