diff --git a/pkg/app/entry_point.go b/pkg/app/entry_point.go index 5a767bb94..b355ebcca 100644 --- a/pkg/app/entry_point.go +++ b/pkg/app/entry_point.go @@ -57,6 +57,11 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes if err != nil { log.Fatal(err) } + + if isRepo, err := isDirectoryAGitRepository(absRepoPath); err != nil || !isRepo { + log.Fatal(absRepoPath + " is not a valid git repository.") + } + cliArgs.WorkTree = absRepoPath cliArgs.GitDir = filepath.Join(absRepoPath, ".git") }