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

reviewable/pr187/r1
Brad Fitzpatrick 5 years ago
parent d348b94505
commit 5aafe0ee96

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

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

Loading…
Cancel
Save