add version check

This commit is contained in:
2025-07-07 11:02:07 -07:00
parent a5b3719d33
commit 970d8c654f
2 changed files with 46 additions and 1 deletions

10
main.go
View File

@ -22,6 +22,16 @@ const (
)
func main() {
outOfDate, err := needUpdate()
if err != nil {
log.Fatal(err)
}
if outOfDate {
fmt.Println("There is a new version of epochcli, please update before running")
os.Exit(1)
}
var (
helpFlag bool
updateOnlyFlag bool