cmd/tailscale: don't crash on too many non-flag args

This commit is contained in:
Brad Fitzpatrick 2020-03-15 22:27:36 -07:00
parent d348b94505
commit 5aafe0ee96
2 changed files with 2 additions and 3 deletions

View File

@ -18,7 +18,6 @@ import (
"syscall"
"github.com/apenwarr/fixconsole"
"github.com/pborman/getopt/v2"
"github.com/peterbourgon/ff/v2/ffcli"
"github.com/tailscale/wireguard-go/wgcfg"
"tailscale.com/ipn"
@ -120,7 +119,7 @@ var upArgs = struct {
func runUp(ctx context.Context, args []string) error {
pol := logpolicy.New("tailnode.log.tailscale.io")
if len(args) > 0 {
log.Fatalf("too many non-flag arguments: %#v", getopt.Args()[0])
log.Fatalf("too many non-flag arguments: %q", args)
}
defer pol.Close()

View File

@ -7,5 +7,5 @@
// Package version provides the version that the binary was built at.
package version
const LONG = "date.20200311"
const LONG = "date.20200315"
const SHORT = LONG // TODO: unused; remove SHORT? Make it a func?