yitsushi / totp-cli

Authy/Google Authenticator like TOTP CLI tool written in Go.

Home Page:http://yitsushi.github.io/totp-cli/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

totp-cli update thinks it has succeeded when it hasn't

peterhoeg opened this issue · comments

In my case it's not expected to work (even if I used sudo, the binary comes from a place mounted read-only), but totp-cli still thinks it got updated:

$ totp-cli update                                  
Check...
Target: totp-cli-v1.3.1-linux-amd64.tar.gz
 -> Download...
 -> Extract...
Error: download error: open /nix/store/j1n6nzhdxd7xbsgpqznq3k8f2v860kv8-totp-cli-1.3.1/bin/totp-cli805377435: read-only file system
Now you have a fresh new totp-cli \o/

🤣 that's a funny one. It handles the error, but continues as nothing happened (https://github.com/yitsushi/totp-cli/blob/main/internal/cmd/update.go#L60-L63).