@ -501,7 +501,6 @@ func runUp(ctx context.Context, cmd string, args []string, upArgs upArgsT) (retE
startLoginInteractive := func ( ) { loginOnce . Do ( func ( ) { localClient . StartLoginInteractive ( ctx ) } ) }
startLoginInteractive := func ( ) { loginOnce . Do ( func ( ) { localClient . StartLoginInteractive ( ctx ) } ) }
go func ( ) {
go func ( ) {
var cv * tailcfg . ClientVersion
for {
for {
n , err := watcher . Next ( )
n , err := watcher . Next ( )
if err != nil {
if err != nil {
@ -512,9 +511,6 @@ func runUp(ctx context.Context, cmd string, args []string, upArgs upArgsT) (retE
msg := * n . ErrMessage
msg := * n . ErrMessage
fatalf ( "backend error: %v\n" , msg )
fatalf ( "backend error: %v\n" , msg )
}
}
if n . ClientVersion != nil {
cv = n . ClientVersion
}
if s := n . State ; s != nil {
if s := n . State ; s != nil {
switch * s {
switch * s {
case ipn . NeedsLogin :
case ipn . NeedsLogin :
@ -533,15 +529,6 @@ func runUp(ctx context.Context, cmd string, args []string, upArgs upArgsT) (retE
} else if printed {
} else if printed {
// Only need to print an update if we printed the "please click" message earlier.
// Only need to print an update if we printed the "please click" message earlier.
fmt . Fprintf ( Stderr , "Success.\n" )
fmt . Fprintf ( Stderr , "Success.\n" )
if cv != nil && ! cv . RunningLatest && cv . LatestVersion != "" {
if cv . UrgentSecurityUpdate {
fmt . Fprintf ( Stderr , "\nSecurity update available: %v -> %v\n" , version . Short ( ) , cv . LatestVersion )
} else {
fmt . Fprintf ( Stderr , "\nUpdate available: %v -> %v\n" , version . Short ( ) , cv . LatestVersion )
}
fmt . Fprintln ( Stderr , "Changelog: https://tailscale.com/changelog/#client" )
fmt . Fprintln ( Stderr , "Run `tailscale update` or `tailscale set --auto-update` to update" )
}
}
}
select {
select {
case running <- true :
case running <- true :
@ -664,7 +651,8 @@ func runUp(ctx context.Context, cmd string, args []string, upArgs upArgsT) (retE
func upWorthyWarning ( s string ) bool {
func upWorthyWarning ( s string ) bool {
return strings . Contains ( s , healthmsg . TailscaleSSHOnBut ) ||
return strings . Contains ( s , healthmsg . TailscaleSSHOnBut ) ||
strings . Contains ( s , healthmsg . WarnAcceptRoutesOff ) ||
strings . Contains ( s , healthmsg . WarnAcceptRoutesOff ) ||
strings . Contains ( s , healthmsg . LockedOut )
strings . Contains ( s , healthmsg . LockedOut ) ||
strings . Contains ( strings . ToLower ( s ) , "update available: " )
}
}
func checkUpWarnings ( ctx context . Context ) {
func checkUpWarnings ( ctx context . Context ) {