Merge pull request #39825 from secrethub/fix/os-darwin
Fix getting the operating system on Darwin
This commit is contained in:
commit
1cfc3060a8
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue