From a702921620f7b6e386f393a9a1340d4218597469 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 4 Nov 2020 08:04:00 -0800 Subject: [PATCH] cmd/tailscale/cli: fix double tag: prefix in tailscale up Signed-off-by: Brad Fitzpatrick (cherry picked from commit 696e160cfceccd8a9b9d255a37a3cc5b94832b17) --- cmd/tailscale/cli/up.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/tailscale/cli/up.go b/cmd/tailscale/cli/up.go index 8610e9e51..7b5d993a2 100644 --- a/cmd/tailscale/cli/up.go +++ b/cmd/tailscale/cli/up.go @@ -186,11 +186,12 @@ func runUp(ctx context.Context, args []string) error { if strings.HasPrefix(tag, "tag:") { // Accept fully-qualified tags (starting with // "tag:"), as we do in the ACL file. - err := tailcfg.CheckTag(tag) - if err != nil { + if err := tailcfg.CheckTag(tag); err != nil { fatalf("tag: %q: %v", tag, err) } - } else if err := tailcfg.CheckTagSuffix(tag); err != nil { + continue + } + if err := tailcfg.CheckTagSuffix(tag); err != nil { fatalf("tag: %q: %v", tag, err) } tags[i] = "tag:" + tag