summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-04-01 13:00:19 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-04-01 13:00:19 -0700
commitdce4baf0f08a072c9dd76ab7db1e8aa884886285 (patch)
tree4c07a6260340bde2db0ec23774151f3f56719917 /lib/chef/provider
parent05ddd50f52b2350f99ef8b2b8138e069713fd609 (diff)
downloadchef-dce4baf0f08a072c9dd76ab7db1e8aa884886285.tar.gz
also need to wrap Errno::EPIPE here at least
possibly others Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/cron.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/cron.rb b/lib/chef/provider/cron.rb
index ae2c482475..c232585c18 100644
--- a/lib/chef/provider/cron.rb
+++ b/lib/chef/provider/cron.rb
@@ -203,14 +203,14 @@ class Chef
so = shell_out!("crontab -l -u #{new_resource.user}", returns: [0, 1])
return nil if so.exitstatus == 1
so.stdout
- rescue Mixlib::ShellOut::ShellCommandFailed => e
+ rescue => e
raise Chef::Exceptions::Cron, "Error determining state of #{new_resource.name}, error: #{e}"
end
def write_crontab(crontab)
write_exception = false
so = shell_out!("crontab -u #{new_resource.user} -", input: crontab)
- rescue Mixlib::ShellOut::ShellCommandFailed => e
+ rescue => e
raise Chef::Exceptions::Cron, "Error updating state of #{new_resource.name}, error: #{e}"
end