Skip to content

Commit

Permalink
Quick fix for #105
Browse files Browse the repository at this point in the history
- add lsb_release because sw_vers doesn't work on linux 
- add system check
  • Loading branch information
deltax authored and senorprogrammer committed Jun 2, 2018
1 parent a7880dd commit 28cabb2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion system/system_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 28cabb2

Please sign in to comment.