Skip to content

Commit 5cb8967

Browse files
committed
remove empty file check, compare file names case-sensitively.
1 parent 79c8154 commit 5cb8967

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

modules/repository/init.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,7 @@ func LoadRepoConfig() error {
6565
return fmt.Errorf("failed to list custom %s files: %w", t, err)
6666
}
6767
for _, f := range customFiles {
68-
stat, err := os.Stat(filepath.Join(customPath, f))
69-
if err != nil {
70-
return fmt.Errorf("failed to stat custom %s file %q: %w", t, f, err)
71-
}
72-
// give end users a chance to hide builtin options if they put an empty file in their custom directory
73-
if stat.Size() == 0 {
74-
files = util.SliceRemoveAllFunc(files, func(s string) bool { return strings.EqualFold(s, f) })
75-
} else if !util.SliceContainsString(files, f, true) {
68+
if !util.SliceContainsString(files, f) {
7669
files = append(files, f)
7770
}
7871
}

0 commit comments

Comments
 (0)