Skip to content

Commit

Permalink
🐛 use proper dict datatypes for macos.userPreferences (#1759)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Sep 18, 2023
1 parent 72b59e2 commit 6730dc9
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions providers/os/resources/macos.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@ import (

func (m *mqlMacos) userPreferences() (map[string]interface{}, error) {
conn := m.MqlRuntime.Connection.(shared.Connection)

res := map[string]interface{}{}
preferences, err := macos.NewPreferences(conn).UserPreferences()
if err != nil {
return nil, err
}

for k := range preferences {
res[k] = preferences[k]
}
return res, nil
return convert.JsonToDict(preferences)
}

func (m *mqlMacos) userHostPreferences() (map[string]interface{}, error) {
Expand All @@ -40,11 +35,7 @@ func (m *mqlMacos) userHostPreferences() (map[string]interface{}, error) {
return nil, err
}

res := map[string]interface{}{}
for k := range preferences {
res[k] = preferences[k]
}
return res, nil
return convert.JsonToDict(preferences)
}

func (m *mqlMacos) globalAccountPolicies() (map[string]interface{}, error) {
Expand Down

0 comments on commit 6730dc9

Please sign in to comment.