Skip to content

Commit 65c5ce0

Browse files
committed
use index instead of link
1 parent f297611 commit 65c5ce0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,14 @@ func validateConfig(yamlData []byte) error {
260260
return fmt.Errorf("worktrees config must be an array in .repositories[%v]", repoMap["remote"])
261261
}
262262

263-
for _, worktreeInterface := range worktreesInterface {
263+
for i, worktreeInterface := range worktreesInterface {
264264
worktreeMap, ok := worktreeInterface.(map[string]interface{})
265265
if !ok {
266266
return fmt.Errorf("worktrees config is not valid in .repositories[%v]", repoMap["remote"])
267267
}
268268

269269
if key := findUnexpectedKey(worktreeMap, allowedWorktreeKeys); key != "" {
270-
return fmt.Errorf("unexpected key: .repositories[%v].worktrees[%v].%v", repoMap["remote"], worktreeMap["link"], key)
270+
return fmt.Errorf("unexpected key: .repositories[%v].worktrees[%v].%v", repoMap["remote"], i, key)
271271
}
272272

273273
// Check "pathspecs" in each worktree

0 commit comments

Comments
 (0)