Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an image can run on. They may be useful for other platforms in the future. This also changes image.store.Create to validate that the loaded image is supported on the current machine. This change affects Linux as well, since it now validates the architecture and OS fields. Signed-off-by: John Starks <jostarks@microsoft.com> Upstream-commit: 194eaa5c0f843257e66b68bd735786308a9d93b2 Component: engine
This commit is contained in:
@ -59,10 +59,7 @@ func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) {
|
||||
// console which supports ANSI emulation, or fall-back to the golang emulator
|
||||
// (github.com/azure/go-ansiterm).
|
||||
func useNativeConsole() bool {
|
||||
osv, err := system.GetOSVersion()
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
osv := system.GetOSVersion()
|
||||
|
||||
// Native console is not available before major version 10
|
||||
if osv.MajorVersion < 10 {
|
||||
|
||||
Reference in New Issue
Block a user