Skip to content

Commit ec5a9b7

Browse files
committed
Fix collector git file issue
1 parent ebd3744 commit ec5a9b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func GetRepoNameFromConfig(path string) (string, error) {
130130

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

0 commit comments

Comments
 (0)