diff --git a/pkg/testing/testing.go b/pkg/testing/testing.go index f953b7d26b..352c71bc3c 100644 --- a/pkg/testing/testing.go +++ b/pkg/testing/testing.go @@ -145,9 +145,10 @@ func ServeRepo(name string, t *testing.T) string { ) // This is to prevent "fatal: detected dubious ownership in repository at " while executing // unit tests on other environments (such as Prow CI) - cmd := exec.Command("git", "config", "--global", "--add", "safe.directory", abs) - _, err := cmd.CombinedOutput() + cmd := exec.Command("git", "config", "--add", "safe.directory", abs) + o, err := cmd.CombinedOutput() if err != nil { + t.Log("error adding safe.directory ", string(o)) t.Fatal(err) } return fmt.Sprintf("%v/%v", url, repo)