MCPcopy Index your code
hub / github.com/cortexproject/cortex / getCortexProjectDir

Function getCortexProjectDir

integration/util.go:23–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21)
22
23func getCortexProjectDir() string {
24 if dir := os.Getenv("CORTEX_CHECKOUT_DIR"); dir != "" {
25 return dir
26 }
27
28 // use the git path if available
29 dir, err := exec.Command("git", "rev-parse", "--show-toplevel").Output()
30 if err == nil {
31 return string(bytes.TrimSpace(dir))
32 }
33
34 return os.Getenv("GOPATH") + "/src/github.com/cortexproject/cortex"
35}
36
37func writeFileToSharedDir(s *e2e.Scenario, dst string, content []byte) error {
38 dst = filepath.Join(s.SharedDir(), dst)

Callers 2

copyFileToSharedDirFunction · 0.85

Calls

no outgoing calls

Tested by 1