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:
parent
fe67bedc86
commit
0d60c8356c
@ -18,7 +18,15 @@ func NewSystemInfo() *SystemInfo {
|
||||
|
||||
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)
|
||||
|
||||
for _, row := range strings.Split(raw, "\n") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user