CHEF-3237: Incorporated the comments on PR 624#767
Conversation
…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
There was a problem hiding this comment.
Ideally we would use "#{ENV['HOME']}/Library/LaunchAgents" here. This should work fine, because elsewhere we use File.expand_path which will do the same thing, but that's a bit removed from this code and it took a minute to confirm we did so. If that was ever changed such that we were interpreting paths with a shell, not all shells expand tilde the same way.
There was a problem hiding this comment.
Bryan,
On 20 May 2013 21:26, Bryan McLellan notifications@github.com wrote:
Ideally we would use "#{ENV['HOME']}/Library/LaunchAgents" here. This
should work fine, because elsewhere we use File.expand_path which will do
the same thing, but that's a bit removed from this code and it took a
minute to confirm we did so. If that was ever changed such that we were
interpreting paths with a shell, not all shells expand tilde the same way.Pull request is updated with your suggestion.
Ringo
|
Merged to master. |
I rebased Igor's changes and incorporated Bryan's review comments on pull request 624.