cmd/tailscale/cli: fix double tag: prefix in tailscale up

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
(cherry picked from commit 696e160cfc)
pull/912/head
Brad Fitzpatrick 4 years ago
parent b9b7fbdd21
commit a702921620

@ -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

Loading…
Cancel
Save