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

Add `user` resource attr to `mac_os_x_userdefaults` #10

Closed patcon closed 11 years ago

patcon commented 12 years ago

This will allow pivotal_workstation to use mac_os_x as a dependency, as they rely on chef being run as sudo but still adjusting the sudo'ing user's defaults.

Related: pivotal/pivotal_workstation#63

patcon commented 12 years ago

Will attach a PR soon

patcon commented 12 years ago

I don't know exactly how shell_out is operating here, so I probably need to play with the cookbook more and figure out what needs to go here: https://github.com/jtimberman/mac_os_x-cookbook/blob/master/providers/userdefaults.rb#L34

Any suggestion are appreciated :)

jtimberman commented 12 years ago

There's a user method to Mixlib::ShellOut, but I haven't used it yet with the shell_out() in the recipe context.

patcon commented 12 years ago

Awesome. Self-reference for later: https://github.com/opscode/mixlib-shellout/blob/master/lib/mixlib/shellout/unix.rb#L90

jtimberman commented 11 years ago

GitHub PR UI says this cannot be automatically merged. Can you rebase with master and re-push?

patcon commented 11 years ago

Done and done. Thanks JT!

cc: @mkocher

jtimberman commented 11 years ago

Thank you sir :D