Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcode software_name to "macOS" #11

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"os"
"os/exec"
"strings"

"github.com/tidwall/gjson"
)
Expand All @@ -26,11 +25,8 @@ func (v *Versions) UserAgent() string {
}

func getSoftwareName() string {
softwareName, err := exec.Command("sw_vers", "-productName").Output()
if err != nil {
panic(fmt.Errorf("error running sw_vers: %w", err))
}
return strings.TrimSpace(string(softwareName))
// Hardcode the software_name to "macOS"
return "macOS"
}

func getSerialNumber() (serial, uuid string) {
Expand Down Expand Up @@ -74,4 +70,4 @@ func Get() Versions {
}
}

var Current = Get()
var Current = Get()