MCPcopy
hub / github.com/tailscale/tailscale / confirmUpdate

Function confirmUpdate

cmd/tailscale/cli/update.go:91–104  ·  view source on GitHub ↗
(ver string)

Source from the content-addressed store, hash-verified

89}
90
91func 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}

Callers

nothing calls this directly

Calls 3

ShortFunction · 0.92
YesNoFunction · 0.92
PrintfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…