tshakalekholoane/bat

Use system call to retrieve the Linux kernel version

tshakalekholoane opened this issue · 0 comments

Replace the following with a system call.

bat/internal/cli/cli.go

Lines 199 to 206 in 9dc3af6

func kernel() (string, error) {
cmd := exec.Command("uname", "--kernel-release")
out, err := cmd.Output()
if err != nil {
return "", err
}
return string(out), nil
}