diff --git a/client/mdm/policy_darwin.go b/client/mdm/policy_darwin.go index 090779bc7..a644e695c 100644 --- a/client/mdm/policy_darwin.go +++ b/client/mdm/policy_darwin.go @@ -54,6 +54,7 @@ func loadPlatformPolicy() (map[string]any, error) { if errors.Is(err, fs.ErrNotExist) { // Not enrolled for NetBird. Caller treats nil as // "no MDM source present". + //nolint:nilnil // (nil, nil) is the documented platform-absent sentinel; see LoadPolicy. return nil, nil } return nil, fmt.Errorf("open %s: %w", policyPlistPath, err) diff --git a/client/mdm/policy_windows.go b/client/mdm/policy_windows.go index 93191e5ac..27d4dbf85 100644 --- a/client/mdm/policy_windows.go +++ b/client/mdm/policy_windows.go @@ -86,6 +86,7 @@ func loadPlatformPolicy() (map[string]any, error) { if err != nil { if errors.Is(err, registry.ErrNotExist) { // Not enrolled. Caller treats nil as "no MDM source present". + //nolint:nilnil // (nil, nil) is the documented platform-absent sentinel; see LoadPolicy. return nil, nil } return nil, fmt.Errorf("open %s: %w", policyRegistryPath, err)