From 42be72f0b43c80f721ff5f4d5a8eec4bf5d453a1 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Thu, 16 Jun 2022 22:25:22 -0700 Subject: [PATCH] add build info to version flag --- agent/utils.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/utils.go b/agent/utils.go index 6d9a851..f5916f8 100644 --- a/agent/utils.go +++ b/agent/utils.go @@ -22,6 +22,7 @@ import ( "os" "path/filepath" "runtime" + goDebug "runtime/debug" "strings" "time" @@ -138,10 +139,13 @@ func GenerateAgentID() string { func ShowVersionInfo(ver string) { fmt.Println("Tactical RMM Agent:", ver) fmt.Println("Arch:", runtime.GOARCH) - fmt.Println("Go version:", runtime.Version()) if runtime.GOOS == "windows" { fmt.Println("Program Directory:", filepath.Join(os.Getenv("ProgramFiles"), progFilesName)) } + bi, ok := goDebug.ReadBuildInfo() + if ok { + fmt.Println(bi.String()) + } } // TotalRAM returns total RAM in GB