diff options
author | John McCrae <john.mccrae@progress.com> | 2022-10-03 03:21:36 +0000 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2022-10-03 03:21:36 +0000 |
commit | 7ba498776ac5a38c50e3125e2d3f376aebdd32a8 (patch) | |
tree | 1eff95604168cb7e2bffad814d04e01ab23d03c4 | |
parent | 22224c65cb0c84eaf12f244d93390239df47d0fa (diff) | |
download | chef-7ba498776ac5a38c50e3125e2d3f376aebdd32a8.tar.gz |
replacing Tempfile.new with Tempfile.create
Signed-off-by: John McCrae <john.mccrae@progress.com>
-rw-r--r-- | lib/chef/provider/cron/unix.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/cron/unix.rb b/lib/chef/provider/cron/unix.rb index 77032e35ad..9d4c8191cb 100644 --- a/lib/chef/provider/cron/unix.rb +++ b/lib/chef/provider/cron/unix.rb @@ -71,7 +71,7 @@ class Chef exit_status = 1 error_message = e.message end - tempcron.close! + tempcron.close if exit_status > 0 raise Chef::Exceptions::Cron, "Error updating state of #{@new_resource.name}, exit: #{exit_status}, message: #{error_message}" end |