Skip to content

[CHEF-3237] Fix Mac OS X service provider. Do not fail when HOME is not set#624

Closed
iafonov wants to merge 1 commit into
chef:masterfrom
iafonov:chef_3237_fix_os_x_service_provider
Closed

[CHEF-3237] Fix Mac OS X service provider. Do not fail when HOME is not set#624
iafonov wants to merge 1 commit into
chef:masterfrom
iafonov:chef_3237_fix_os_x_service_provider

Conversation

@iafonov

@iafonov iafonov commented Feb 5, 2013

Copy link
Copy Markdown
Contributor

http://tickets.opscode.com/browse/CHEF-3237

Fix Mac OS X service provider. Do not fail when HOME is not set

  • Do not add ~/Library/LaunchAgents if HOME is not set
  • It is safe to assume that if HOME is not set ~ will not expand - see rb_home_dir function in MRI ruby

NB: It is unclear from the diff but there is not so much changes to file, I've extracted a separate isolated context from existing tests and added a separate context for method that gathers plist dirs. You can see it here - https://github.com/iafonov/chef/blob/20ff8e5a508fad1823809c4e3988c579e05e7d4c/spec/unit/provider/service/macosx_spec.rb#L22

…ot set

* Do not add `~/Library/LaunchAgents` if HOME is not set
* It is safe to assume that if HOME is not set ~ will not expand - see rb_home_dir function in MRI ruby

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only need this line.

@btm

btm commented Oct 9, 2013

Copy link
Copy Markdown
Contributor

Fixed by #767

@btm btm closed this Oct 9, 2013
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants