diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-05-13 16:13:43 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-05-13 16:19:55 -0700 |
commit | 2cfd71c9725942616eb7d3a6713a662c0a639c24 (patch) | |
tree | 842dd8e012674aa704ea37c929da396e0e97b6a4 | |
parent | 9d16843aeff960de53c06da0f7a58369e22c9d90 (diff) | |
download | chef-fix-null-exception-in-launchd.tar.gz |
Fix issue with unexpected nil.fix-null-exception-in-launchd
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | lib/chef/provider/launchd.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/launchd.rb b/lib/chef/provider/launchd.rb index 579a53fe03..2feef3e26e 100644 --- a/lib/chef/provider/launchd.rb +++ b/lib/chef/provider/launchd.rb @@ -64,7 +64,7 @@ class Chef action :delete do # If you delete a service you want to make sure its not loaded or # the service will be in memory and you wont be able to stop it. - if ::File.exists?(@path) + if ::File.exists?(path) manage_service(:disable) end manage_plist(:delete) @@ -207,7 +207,7 @@ class Chef # @api private def path - @path = new_resource.path ? new_resource.path : gen_path_from_type + new_resource.path || gen_path_from_type end end end |