Files
docker-machine/libmachine/crashreport/os_linux.go
David Gageot af09ebbe4e This code is only useful to crash reports
Signed-off-by: David Gageot <david@gageot.net>
2016-01-06 12:36:22 +01:00

13 lines
256 B
Go

package crashreport
import "os/exec"
func localOSVersion() string {
command := exec.Command("bash", "-c", `cat /etc/os-release | grep 'VERSION=' | cut -d'=' -f2`)
output, err := command.Output()
if err != nil {
return ""
}
return string(output)
}