From a8d39666d4e56982652eade28996dc30ff5e585a Mon Sep 17 00:00:00 2001 From: Kirtana Ashok Date: Wed, 3 Jan 2024 16:05:08 -0800 Subject: [PATCH] Move cimfs OS build compat check to the operation functions instead of init() Signed-off-by: Kirtana Ashok --- diff/windows/cimfs.go | 2 +- snapshots/windows/cimfs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/diff/windows/cimfs.go b/diff/windows/cimfs.go index fb1441d25..3d2831a21 100644 --- a/diff/windows/cimfs.go +++ b/diff/windows/cimfs.go @@ -51,7 +51,7 @@ func init() { } 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()) return NewCimDiff(md.(*metadata.DB).ContentStore()) diff --git a/snapshots/windows/cimfs.go b/snapshots/windows/cimfs.go index 27adfe681..a27a72c6a 100644 --- a/snapshots/windows/cimfs.go +++ b/snapshots/windows/cimfs.go @@ -70,7 +70,7 @@ func init() { // NewCimFSSnapshotter returns a new CimFS based windows snapshotter func NewCimFSSnapshotter(root string) (snapshots.Snapshotter, error) { 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)