From d9b28a06d98d2e6a09b5ae1ebe62ea1ab43cfe76 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Tue, 27 Mar 2018 17:06:36 +0200 Subject: [PATCH] Take into consideration that path may contain multiple `status-go` directories, take the last (#776) - Happens in Jenkins --- t/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/utils/utils.go b/t/utils/utils.go index 54ff2342c..bdf600cad 100644 --- a/t/utils/utils.go +++ b/t/utils/utils.go @@ -63,7 +63,7 @@ func init() { const pathSeparator = string(os.PathSeparator) RootDir = filepath.Dir(pwd) pathDirs := strings.Split(RootDir, pathSeparator) - for i := range pathDirs { + for i := len(pathDirs) - 1; i >= 0; i-- { if pathDirs[i] == "status-go" { RootDir = filepath.Join(pathDirs[:i+1]...) RootDir = filepath.Join(pathSeparator, RootDir)