mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-15 23:47:39 +00:00
version: fix CmdName on the tailscale-ipn.exe binary
Don't return "wg64", "wg32", etc. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
93c2882a2f
commit
2db877caa3
@@ -5,6 +5,7 @@
|
||||
package version
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
@@ -36,3 +37,18 @@ func exe() string {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var findModuleInfoName = flag.String("module-info-file", "", "if non-empty, test findModuleInfo against this filename")
|
||||
|
||||
func TestFindModuleInfoManual(t *testing.T) {
|
||||
exe := *findModuleInfoName
|
||||
if exe == "" {
|
||||
t.Skip("skipping without --module-info-file filename")
|
||||
}
|
||||
cmd := cmdName(exe)
|
||||
mod, err := findModuleInfo(exe)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Logf("Got %q from: %s", cmd, mod)
|
||||
}
|
||||
|
Reference in New Issue
Block a user