mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
cmd/tailscale: don't crash on too many non-flag args
This commit is contained in:
parent
d348b94505
commit
5aafe0ee96
@ -18,7 +18,6 @@
|
|||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/apenwarr/fixconsole"
|
"github.com/apenwarr/fixconsole"
|
||||||
"github.com/pborman/getopt/v2"
|
|
||||||
"github.com/peterbourgon/ff/v2/ffcli"
|
"github.com/peterbourgon/ff/v2/ffcli"
|
||||||
"github.com/tailscale/wireguard-go/wgcfg"
|
"github.com/tailscale/wireguard-go/wgcfg"
|
||||||
"tailscale.com/ipn"
|
"tailscale.com/ipn"
|
||||||
@ -120,7 +119,7 @@ func main() {
|
|||||||
func runUp(ctx context.Context, args []string) error {
|
func runUp(ctx context.Context, args []string) error {
|
||||||
pol := logpolicy.New("tailnode.log.tailscale.io")
|
pol := logpolicy.New("tailnode.log.tailscale.io")
|
||||||
if len(args) > 0 {
|
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()
|
defer pol.Close()
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
// Package version provides the version that the binary was built at.
|
// Package version provides the version that the binary was built at.
|
||||||
package version
|
package version
|
||||||
|
|
||||||
const LONG = "date.20200311"
|
const LONG = "date.20200315"
|
||||||
const SHORT = LONG // TODO: unused; remove SHORT? Make it a func?
|
const SHORT = LONG // TODO: unused; remove SHORT? Make it a func?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user