mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Bug fix: lsb_release
This commit is contained in:
parent
d1b05dded4
commit
6e1b8b3b47
@ -22,7 +22,8 @@ func NewSystemInfo() *SystemInfo {
|
||||
var cmd *exec.Cmd
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
cmd = exec.Command("uname -a", arg...)
|
||||
arg = append(arg, "-a")
|
||||
cmd = exec.Command("lsb_release", arg...)
|
||||
case "darwin":
|
||||
cmd = exec.Command("sw_vers", arg...)
|
||||
default:
|
||||
@ -33,7 +34,6 @@ func NewSystemInfo() *SystemInfo {
|
||||
|
||||
for _, row := range strings.Split(raw, "\n") {
|
||||
parts := strings.Split(row, ":")
|
||||
|
||||
if len(parts) < 2 {
|
||||
continue
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user