-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
Deleting a standard replica index works, but trying to delete a virtual replica causes a panic:
Deleting replica index test_replica ⣾panic: runtime error: slice bounds out of range [:-1]
goroutine 1 [running]:
github.com/algolia/cli/pkg/cmd/indices/delete.detachReplicaIndex({0x16f516fd5, 0xc}, {0x14000452520, 0xa}, 0x1400042a300)
/home/runner/work/cli/cli/pkg/cmd/indices/delete/delete.go:222 +0x484
github.com/algolia/cli/pkg/cmd/indices/delete.deleteReplicaIndex(0x140001724d0?, 0x1400030ba80)
/home/runner/work/cli/cli/pkg/cmd/indices/delete/delete.go:179 +0xd4
github.com/algolia/cli/pkg/cmd/indices/delete.runDeleteCmd(0x1400012b2c0)
/home/runner/work/cli/cli/pkg/cmd/indices/delete/delete.go:155 +0x884
github.com/algolia/cli/pkg/cmd/indices/delete.NewDeleteCmd.func1(0x14000217680?, {0x140002ccfb0?, 0x1?, 0x1?})
/home/runner/work/cli/cli/pkg/cmd/indices/delete/delete.go:78 +0xa4
github.com/spf13/cobra.(*Command).execute(0x14000217680, {0x140002ccf90, 0x1, 0x1})
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x4d0
github.com/spf13/cobra.(*Command).ExecuteC(0x140001d9b80)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x354
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:927
github.com/algolia/cli/pkg/cmd/root.Execute()
/home/runner/work/cli/cli/pkg/cmd/root/root.go:198 +0x2e4
main.main()
/home/runner/work/cli/cli/cmd/algolia/main.go:10 +0x1c
Metadata
Metadata
Assignees
Labels
No labels