func runUpdate(cmd *Command, args []string) { if Version == "dev" { fmt.Println("ERROR: can't update dev version") return } d := dist.NewDist("ddollar/forego", Version) to, err := d.Update() if err != nil { fmt.Printf("ERROR: %s\n", err) } else { fmt.Printf("updated to %s\n", to) } }
func runUpdate(cmd *Command, args []string) { d := dist.NewDist("heroku/force", Version) if len(args) == 1 { err := d.FullUpdate(args[0]) if err != nil { ErrorAndExit(err.Error()) } else { fmt.Printf("updated to %s\n", args[0]) } } else { if Version == "dev" { ErrorAndExit("can't update dev version") } to, err := d.Update() if err != nil { ErrorAndExit(err.Error()) } else { fmt.Printf("updated to %s\n", to) } } }