Skip to content

Commit bef6e28

Browse files
authored
cmd/tailscale: move call to cli.CleanUpArgs() from main() into cli.Run() (tailscale#4954)
Not all distributions build from package main. Signed-off-by: Jordan Whited <jordan@tailscale.com>
1 parent 40503ef commit bef6e28

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmd/tailscale/cli/cli.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ var localClient tailscale.LocalClient
129129

130130
// Run runs the CLI. The args do not include the binary name.
131131
func Run(args []string) (err error) {
132+
args = CleanUpArgs(args)
133+
132134
if len(args) == 1 && (args[0] == "-V" || args[0] == "--version") {
133135
args = []string{"version"}
134136
}

cmd/tailscale/tailscale.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717

1818
func main() {
1919
args := os.Args[1:]
20-
args = cli.CleanUpArgs(args)
2120
if name, _ := os.Executable(); strings.HasSuffix(filepath.Base(name), ".cgi") {
2221
args = []string{"web", "-cgi"}
2322
}

0 commit comments

Comments
 (0)