isacikgoz / tldr

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

Release can't work #6

Closed eromoe closed 5 years ago

eromoe commented 5 years ago

Hello,

I downloaded tldr_0.5.0_linux_arm64.tar.gz, and found it can not work :

➜  ~ ./tldr --help
usage: tldr [<flags>] [<command>...]

Flags:
      --help         Show context-sensitive help (also try --help-long and --help-man).
  -c, --clear-cache  Clear local repository then clone github.com/tldr-pages/tldr
  -u, --update       Pulls the latest commits from github.com/tldr-pages/tldr
  -s, --static       Static mode, application behaves like a conventional tldr client.
  -r, --random       Random page for testing purposes.
      --version      Show application version.

Args:
  [<command>]  Name of the command. (e.g. tldr grep)

➜  ~ ./tldr -u
➜  ~ ./tldr tar
This page (tar) doesn't exist yet!
Submit new pages here: https://github.com/tldr-pages/tldr#                                                              
➜  ~ ./tldr zip
This page (zip) doesn't exist yet!
Submit new pages here: https://github.com/tldr-pages/tldr#                                                              
➜  ~ ./tldr -r
panic: invalid argument to Intn

goroutine 1 [running]:
math/rand.(*Rand).Intn(0xc4200821b0, 0x0, 0x157c599f75927412)
        /usr/lib/go-1.10/src/math/rand/rand.go:166 +0x9c
math/rand.Intn(0x0, 0x74fc9f)
        /usr/lib/go-1.10/src/math/rand/rand.go:326 +0x37
github.com/isacikgoz/tldr/pkg/pages.QueryRandom(0x0, 0x0, 0x0)
        /home/isacikgoz/.local/share/go/src/github.com/isacikgoz/tldr/pkg/pages/pages.go:90 +0x60e
main.main()
        /home/isacikgoz/git/tldr/main.go:31 +0x567
isacikgoz commented 5 years ago

hi @eromoe thanks for the feedback. Can you give me more detail about your OS and Arch( is your architecture arm64?)

It seems that, app couldn’t manage to clone git repository of tldr-pages.

eromoe commented 5 years ago

os: ubuntu 18.04 uname -a : Linux ubuntu 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I have installed tldr bash version before , did this matter ?

PS: tldr_0.5.0_linux_arm64 seems not support mintty/cygwin on windows 10 x64 ?

isacikgoz commented 5 years ago

I guess, you should download the tldr_0.5.0_linux_amd64 version since your OS architecture is x86_64. tldr has its own version for Windows that packed into an exe file. You can use that one instead of Linux version.

ps: the name amd64 and arm64 looks very similar tho.

eromoe commented 5 years ago

Sorry, I pasted the wrong name . It is tldr_0.5.0_linux_amd64 , tldr_0.5.0_linux_arm64 even can't execute .

isacikgoz commented 5 years ago

Well, let's focus on the repository existence issue.

tldr++ uses $HOME/.local/share folder to store tldr-pagesrepository. Let's check the steps below

eromoe commented 5 years ago

$HOME/.local/share/tldr is a directory but not git repository. Remove it and tldr -u solve it.

I think it is because previous installed tldr(bash version) generate that folder .

isacikgoz commented 5 years ago

I will add a check for this issue in the next release, thanks for the comprehensive report and assisting with the resolution @eromoe!

halturin commented 5 years ago

Doesnt work for me too. Trying to build:

go get -u github.com/isacikgoz/tldr

got error

<<skipped>>
go: extracting github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942
# github.com/isacikgoz/tldr/pkg/prompt
/home/user/devel/goenv/pkg/mod/github.com/isacikgoz/tldr@v0.5.0/pkg/prompt/prompt.go:179:12: confirm.AddSudo undefined (type *survey.Confirm has no field or method AddSudo)
isacikgoz commented 5 years ago

Thanks for the feedback @halturin I will be looking into this issue. It is probably caused by a dependency issue, for now, you can install pre-compiled binary from releases page.

isacikgoz commented 5 years ago

There is no sign of any occurrence of this issue. Hence, I am closing it.