Sous-Chefs-Boneyard / mac_os_x

This cookbook has been deprecated
https://supermarket.chef.io/cookbooks/mac_os_x
Apache License 2.0
75 stars 25 forks source link

Don't add '-g' to defaults read command for NSGlobalDomain #17

Closed jeroenj closed 10 years ago

jeroenj commented 11 years ago

Reading defaults of NSGlobalDomain fails. The provider would add a -g option when reading NSGlobalDomain defaults, which causes the command to fail and causes the provider to always set the value even if it hasn't changed. This is what the provider does:

defaults read NSGlobalDomain -g NSAllowContinuousSpellChecking
=> The domain/default pair of (kCFPreferencesAnyApplication, -g) does not exist

Using both NSGlobalDomain and -g doesn't work (anymore?) The following commands both correctly return the current value:

defaults read NSGlobalDomain NSAllowContinuousSpellChecking
defaults read -g NSAllowContinuousSpellChecking

Here is the issue I've created in the chef ticketing system. It this required for me to do, or can I just create pull requests to this repository? https://tickets.opscode.com/browse/COOK-3585

jeroenj commented 11 years ago

Quoted from the defaults man page:

-g | -globalDomain | NSGlobalDomain
          Specify the global domain. '-g' and '-globalDomain' may be used as synonyms for NSGlobalDomain.

So defining both isn't really needed.

chasestubblefield commented 11 years ago

+1

jtimberman commented 10 years ago

Hey there,

Sorry for the lack of response on this. Seems good. Thanks!

jeroenj commented 10 years ago

@jtimberman Would you mind releasing a new version of this cookbook with this fix?

juliandunn commented 10 years ago

@jeroenj I just released v1.4.4 which contains this fix.

jeroenj commented 10 years ago

Thanks!