mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-30 12:42:31 +00:00
tsnet: Default executable name on iOS
When compiled into TailscaleKit.framework (via the libtailscale repository), os.Executable() returns an error instead of the name of the executable. This commit adds another branch to the switch statement that enumerates platforms which behave in this manner, and defaults to "tsnet" in the same manner as those other platforms. Fixes #15410. Signed-off-by: James Nugent <james@jen20.com>
This commit is contained in:
parent
5aa1c27aad
commit
75373896c7
@ -505,6 +505,11 @@ func (s *Server) start() (reterr error) {
|
||||
// directory and hostname when they're not supplied. But we can fall
|
||||
// back to "tsnet" as well.
|
||||
exe = "tsnet"
|
||||
case "ios":
|
||||
// When compiled as a framework (via TailscaleKit in libtailscale),
|
||||
// os.Executable() returns an error, so fall back to "tsnet" there
|
||||
// too.
|
||||
exe = "tsnet"
|
||||
default:
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user