isacikgoz / tldr

fast and interactive tldr client written with go
https://isacikgoz.me/tldr/
MIT License
1.36k stars 48 forks source link

Panic when running `tldr -r` #34

Open dbrgn opened 3 years ago

dbrgn commented 3 years ago

After a fresh install of tldr++ 0.6.1 on Arch (via AUR), when I simply run tldr -r (without updating the cache first), I get a panic.

danilo@x2000:~$ tldr -r
TLDR repository is older than 2 weeks, consider updating it with -u option.
panic: invalid argument to Intn

goroutine 1 [running]:
math/rand.(*Rand).Intn(0xc00007c420, 0x0, 0x557e01f9c1c0)
    math/rand/rand.go:169 +0x9e
math/rand.Intn(...)
    math/rand/rand.go:337
github.com/isacikgoz/tldr/pkg/pages.QueryRandom(0x0, 0x0, 0x0)
    github.com/isacikgoz/tldr/pkg/pages/pages.go:90 +0x42f
main.main()
    github.com/isacikgoz/tldr/main.go:31 +0x5b5
HazemKaroui commented 3 years ago

Same issue with 1.0.0.alpha Application doesn't work