Skip to content

Commit eee32f3

Browse files
committed
Fix AskStubber erroring out when there are more asks than stubs
1 parent e2efc0b commit eee32f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/prompt/stubber.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func InitAskStubber() (*AskStubber, func()) {
2626
as.AskOnes = append(as.AskOnes, &p)
2727
count := as.OneCount
2828
as.OneCount += 1
29-
if count > len(as.StubOnes) {
29+
if count >= len(as.StubOnes) {
3030
panic(fmt.Sprintf("more asks than stubs. most recent call: %v", p))
3131
}
3232
stubbedPrompt := as.StubOnes[count]

0 commit comments

Comments
 (0)