Move cimfs OS build compat check
to the operation functions instead of init() Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
parent
f8b07365d2
commit
a8d39666d4
@ -51,7 +51,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !cimfs.IsCimFSSupported() {
|
if !cimfs.IsCimFSSupported() {
|
||||||
return nil, fmt.Errorf("host windows version doesn't support CimFS")
|
return nil, fmt.Errorf("host windows version doesn't support CimFS: %w", plugin.ErrSkipPlugin)
|
||||||
}
|
}
|
||||||
ic.Meta.Platforms = append(ic.Meta.Platforms, platforms.DefaultSpec())
|
ic.Meta.Platforms = append(ic.Meta.Platforms, platforms.DefaultSpec())
|
||||||
return NewCimDiff(md.(*metadata.DB).ContentStore())
|
return NewCimDiff(md.(*metadata.DB).ContentStore())
|
||||||
|
@ -70,7 +70,7 @@ func init() {
|
|||||||
// NewCimFSSnapshotter returns a new CimFS based windows snapshotter
|
// NewCimFSSnapshotter returns a new CimFS based windows snapshotter
|
||||||
func NewCimFSSnapshotter(root string) (snapshots.Snapshotter, error) {
|
func NewCimFSSnapshotter(root string) (snapshots.Snapshotter, error) {
|
||||||
if !cimfs.IsCimFSSupported() {
|
if !cimfs.IsCimFSSupported() {
|
||||||
return nil, fmt.Errorf("host windows version doesn't support CimFS")
|
return nil, fmt.Errorf("host windows version doesn't support CimFS: %w", plugin.ErrSkipPlugin)
|
||||||
}
|
}
|
||||||
|
|
||||||
baseSn, err := newBaseSnapshotter(root)
|
baseSn, err := newBaseSnapshotter(root)
|
||||||
|
Loading…
Reference in New Issue
Block a user