Skip to content

Commit

Permalink
Fix possible index error
Browse files Browse the repository at this point in the history
  • Loading branch information
sarumaj authored Sep 13, 2024
1 parent 048e93e commit 83e02d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/configfile/configuration_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func newBinaryProgressbar() *util.Progressbar {
func OpenLins(links []string) {
c := util.Console()
client := browser.New("", c.Stdout(), c.Stderr())
for {
for len(links) > 0 {
choice := supererrors.ExceptFn(supererrors.W(
prompt.Select(
"Select a link to open:",
Expand All @@ -98,4 +98,7 @@ func OpenLins(links []string) {
links = append(links[:choice], links[choice+1:]...)[: len(links)-1 : len(links)-1]
}

if len(links) == 0 {
os.Exit(0)
}
}

0 comments on commit 83e02d4

Please sign in to comment.