mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
cmd/tailscale/cli: don't run CLI as a service on gokrazy
Updates #13038 Updates #1866 Change-Id: Ie3223573044a92f5715a827fb66cc6705b38004f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
84adfa1ba3
commit
b7e48058c8
@ -84,6 +84,13 @@ func CleanUpArgs(args []string) []string {
|
|||||||
|
|
||||||
// Run runs the CLI. The args do not include the binary name.
|
// Run runs the CLI. The args do not include the binary name.
|
||||||
func Run(args []string) (err error) {
|
func Run(args []string) (err error) {
|
||||||
|
if runtime.GOOS == "linux" && os.Getenv("GOKRAZY_FIRST_START") == "1" && distro.Get() == distro.Gokrazy {
|
||||||
|
// We're running on gokrazy and it's the first start.
|
||||||
|
// Don't run the tailscale CLI as a service; just exit.
|
||||||
|
// See https://gokrazy.org/development/process-interface/
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
args = CleanUpArgs(args)
|
args = CleanUpArgs(args)
|
||||||
|
|
||||||
if len(args) == 1 && (args[0] == "-V" || args[0] == "--version") {
|
if len(args) == 1 && (args[0] == "-V" || args[0] == "--version") {
|
||||||
|
Loading…
Reference in New Issue
Block a user