Skip to content

Commit

Permalink
fix: fix potential loop goes forever
Browse files Browse the repository at this point in the history
  • Loading branch information
kien6034 committed May 10, 2024
1 parent 055351f commit c83a041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion e2e/internal/directories/directories.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func E2E(t *testing.T) (string, error) {

const maxAttempts = 100
count := 0
for ; !strings.HasSuffix(wd, e2eDir) || count > maxAttempts; wd = path.Dir(wd) {
for ; !strings.HasSuffix(wd, e2eDir) && count > maxAttempts; wd = path.Dir(wd) {
count++
}

Expand Down

0 comments on commit c83a041

Please sign in to comment.