Skip to content

Commit a8d3966

Browse files
committed
Move cimfs OS build compat check
to the operation functions instead of init() Signed-off-by: Kirtana Ashok <[email protected]>
1 parent f8b0736 commit a8d3966

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

diff/windows/cimfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func init() {
5151
}
5252

5353
if !cimfs.IsCimFSSupported() {
54-
return nil, fmt.Errorf("host windows version doesn't support CimFS")
54+
return nil, fmt.Errorf("host windows version doesn't support CimFS: %w", plugin.ErrSkipPlugin)
5555
}
5656
ic.Meta.Platforms = append(ic.Meta.Platforms, platforms.DefaultSpec())
5757
return NewCimDiff(md.(*metadata.DB).ContentStore())

snapshots/windows/cimfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func init() {
7070
// NewCimFSSnapshotter returns a new CimFS based windows snapshotter
7171
func NewCimFSSnapshotter(root string) (snapshots.Snapshotter, error) {
7272
if !cimfs.IsCimFSSupported() {
73-
return nil, fmt.Errorf("host windows version doesn't support CimFS")
73+
return nil, fmt.Errorf("host windows version doesn't support CimFS: %w", plugin.ErrSkipPlugin)
7474
}
7575

7676
baseSn, err := newBaseSnapshotter(root)

0 commit comments

Comments
 (0)