(ver string)
| 89 | } |
| 90 | |
| 91 | func confirmUpdate(ver string) bool { |
| 92 | if updateArgs.yes { |
| 93 | fmt.Printf("Updating Tailscale from %v to %v; --yes given, continuing without prompts.\n", version.Short(), ver) |
| 94 | return true |
| 95 | } |
| 96 | |
| 97 | if updateArgs.dryRun { |
| 98 | fmt.Printf("Current: %v, Latest: %v\n", version.Short(), ver) |
| 99 | return false |
| 100 | } |
| 101 | |
| 102 | msg := fmt.Sprintf("This will update Tailscale from %v to %v. Continue?", version.Short(), ver) |
| 103 | return prompt.YesNo(msg, true) |
| 104 | } |