This commit is contained in:
2026-02-19 10:07:43 +00:00
parent 007438e372
commit 6e637ecf77
1763 changed files with 60820 additions and 279516 deletions

View File

@@ -12,7 +12,7 @@ import (
"io"
"os"
"path"
"path/filepath"
"runtime"
"strings"
)
@@ -30,7 +30,7 @@ func CmdName() string {
func cmdName(exe string) string {
// fallbackName, the lowercase basename of the executable, is what we return if
// we can't find the Go module metadata embedded in the file.
fallbackName := filepath.Base(strings.TrimSuffix(strings.ToLower(exe), ".exe"))
fallbackName := prepExeNameForCmp(exe, runtime.GOARCH)
var ret string
info, err := findModuleInfo(exe)
@@ -45,10 +45,10 @@ func cmdName(exe string) string {
break
}
}
if strings.HasPrefix(ret, "wg") && fallbackName == "tailscale-ipn" {
// The tailscale-ipn.exe binary for internal build system packaging reasons
// has a path of "tailscale.io/win/wg64", "tailscale.io/win/wg32", etc.
// Ignore that name and use "tailscale-ipn" instead.
if runtime.GOOS == "windows" && strings.HasPrefix(ret, "gui") && checkPreppedExeNameForGUI(fallbackName) {
// The GUI binary for internal build system packaging reasons
// has a path of "tailscale.io/win/gui".
// Ignore that name and use fallbackName instead.
return fallbackName
}
if ret == "" {