sanbornm / go-selfupdate

Enable your Go applications to self update
MIT License
1.53k stars 175 forks source link

Instructions in readme are incomplete #30

Closed mar1ged closed 1 year ago

mar1ged commented 5 years ago

Something seems to be missing from the README.md. After I ran the mentioned go get command the go-selfupdate binary is missing (or to be more concrete: can not be found on the PATH)

When I prefix the path to the binary it works, at least up to this:


read myapp/.git: is a directory
panic: read myapp/.git: is a directory

goroutine 1 [running]:
main.createUpdate(0xc00008a2a0, 0x14, 0xc00008a130, 0x4)
    /home/me/go/src/github.com/sanbornm/go-selfupdate/cmd/go-selfupdate/main.go:80 +0xe5a
main.main()
    /home/me/go/src/github.com/sanbornm/go-selfupdate/cmd/go-selfupdate/main.go:176 +0x439
``
mar1ged commented 5 years ago

I guess this is because when go-selfupdate parses the directory specified by go-selfupdate nameofdirectory version it only supports files and can not traverse subdirectories.

I tested this with a directory test in which I put two files: test1 and test2. After I ran ~/go/bin/go-selfupdate test 1.1 I found the expected directory named public which contains these files:

When I instead use the name of a binary (like go-selfupdate nameofbinary 1.1 I get a public directory with this content: