mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-03 20:45:24 +00:00
cmd/tailscale: move call to cli.CleanUpArgs() from main() into cli.Run() (#4954)
Not all distributions build from package main. Signed-off-by: Jordan Whited <jordan@tailscale.com> (cherry picked from commit bef6e2831a9b03e77ce1276ce94f8295061becc4)
This commit is contained in:
parent
e4d881923f
commit
e7d5d90037
@ -129,6 +129,8 @@ var localClient tailscale.LocalClient
|
||||
|
||||
// Run runs the CLI. The args do not include the binary name.
|
||||
func Run(args []string) (err error) {
|
||||
args = CleanUpArgs(args)
|
||||
|
||||
if len(args) == 1 && (args[0] == "-V" || args[0] == "--version") {
|
||||
args = []string{"version"}
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ import (
|
||||
|
||||
func main() {
|
||||
args := os.Args[1:]
|
||||
args = cli.CleanUpArgs(args)
|
||||
if name, _ := os.Executable(); strings.HasSuffix(filepath.Base(name), ".cgi") {
|
||||
args = []string{"web", "-cgi"}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user