1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Quick fix for #105

- add lsb_release because sw_vers doesn't work on linux 
- add system check
This commit is contained in:
deltax 2018-06-01 12:33:11 +02:00 committed by Chris Cummer
parent b62a18a96f
commit c252cc5022

View File

@ -18,7 +18,15 @@ func NewSystemInfo() *SystemInfo {
arg := []string{} arg := []string{}
cmd := exec.Command("sw_vers", arg...) switch runtime.GOOS {
case "linux":
cmd := exec.Command("lsb_release -a", arg...)
case "darwin":
cmd := exec.Command("sw_vers", arg...)
default:
return ""
}
raw := wtf.ExecuteCommand(cmd) raw := wtf.ExecuteCommand(cmd)
for _, row := range strings.Split(raw, "\n") { for _, row := range strings.Split(raw, "\n") {