cmd/tailscale/cli/up: "LoggedOut" pref is implicit.
There's no need to warn that it was not provided on the command line after doing a sequence of up; logout; up --args. If you're asking for tailscale to be up, you always mean that you prefer LoggedOut to become false. Fixes #1828 Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
@@ -552,9 +552,17 @@ func checkForAccidentalSettingReverts(flagSet map[string]bool, curPrefs *ipn.Pre
|
||||
flagExplicitValue := map[string]interface{}{} // e.g. "accept-dns" => true (from flagSet)
|
||||
for i := 0; i < prefType.NumField(); i++ {
|
||||
prefName := prefType.Field(i).Name
|
||||
// Persist is a legacy field used for storing keys, which
|
||||
// probably should never have been part of Prefs. It's
|
||||
// likely to migrate elsewhere eventually.
|
||||
if prefName == "Persist" {
|
||||
continue
|
||||
}
|
||||
// LoggedOut is a preference, but running the "up" command
|
||||
// always implies that the user now prefers LoggedOut->false.
|
||||
if prefName == "LoggedOut" {
|
||||
continue
|
||||
}
|
||||
flagName, hasFlag := flagForPref[prefName]
|
||||
|
||||
// Special case for advertise-exit-node; which is a
|
||||
|
||||
Reference in New Issue
Block a user