Repository navigation
ipn/ipnserver: provide means of setting debug env vars on Windows - #3692
Conversation
Fixes #3688 Change-Id: I2f88ca32bf764e2b084fe544d821c43b6a20ffa5 Signed-off-by: Brad Fitzpatrick <[email protected]>
crawshaw
left a comment
There was a problem hiding this comment.
The fact that we have this and registry keys on windows is a bit confusing. What's the logic for what goes where?
| if runtime.GOOS != "windows" { | ||
| return nil, nil | ||
| } | ||
| name := filepath.Join(os.Getenv("ProgramData"), "Tailscale", "tailscaled-env.txt") |
There was a problem hiding this comment.
Rather than an absolute path can we find this relative to the executable, for debug setups that run from a directory rather than using the installer?
There was a problem hiding this comment.
Not worth it. If you're using a debug setup and running a custom binary from cmd.exe, you can set the environment variable by hand already in cmd.exe or powershell. You don't need this mechanism for that.
This is purely for running as a service.
Supported things can go in the registry. Debug crap that's debug-portable between Linux/Windows/etc can continue to go in the environment. (We have dozens already... this just makes it usable on Windows when running as a service.... you can already set them by hand on Windows but only for tailscaled in the foreground in an admin cmd.exe) |
Fixes #3688