diff --git a/pkg/parsers/operatingsystem/operatingsystem_unix.go b/pkg/parsers/operatingsystem/operatingsystem_unix.go index e3baac4045..78a24d2a70 100644 --- a/pkg/parsers/operatingsystem/operatingsystem_unix.go +++ b/pkg/parsers/operatingsystem/operatingsystem_unix.go @@ -5,6 +5,7 @@ package operatingsystem // import "github.com/docker/docker/pkg/parsers/operatin import ( "errors" "os/exec" + "strings" ) // GetOperatingSystem gets the name of the current operating system. @@ -14,7 +15,7 @@ func GetOperatingSystem() (string, error) { if err != nil { return "", err } - return string(osName), nil + return strings.TrimSpace(string(osName)), nil } // GetOperatingSystemVersion gets the version of the current operating system, as a string.