Skip to content

Commit

Permalink
Fix collector git file issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Tzvonimir committed Oct 28, 2024
1 parent ebd3744 commit ec5a9b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func GetRepoNameFromConfig(path string) (string, error) {

gitPath := filepath.Join(path, ".git")
info, err := os.Stat(gitPath)
if err != nil && !info.IsDir() {
if err != nil && info != nil && !info.IsDir() {
return "", fmt.Errorf("could not find .git directory: %w", err)
}

Expand Down

0 comments on commit ec5a9b7

Please sign in to comment.