Fix transfer service dependencies:
- Fill OSVersion field of ocispec.Platform for windows OS in transfer service plugin init() - Do not return error from transfer service ReceiveStream if stream.Recv() returned context.Canceled error Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
package platforms
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
specs "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// NewMatcher returns a Windows matcher that will match on osVersionPrefix if
|
||||
@@ -32,3 +35,8 @@ func newDefaultMatcher(platform specs.Platform) Matcher {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func GetWindowsOsVersion() string {
|
||||
major, minor, build := windows.RtlGetNtVersionNumbers()
|
||||
return fmt.Sprintf("%d.%d.%d", major, minor, build)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user