summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-05-04 19:33:52 -0700
committerTim Smith <tsmith84@gmail.com>2020-05-04 19:33:52 -0700
commitefb1e88fb848777144709680298a0761f294ebad (patch)
tree8243062f595bf369a411836913d1143c38b5f09a
parentef16c85f47cb1fc5684cc7731c32c161626fee6d (diff)
downloadchef-efb1e88fb848777144709680298a0761f294ebad.tar.gz
Make sure command is actually present
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb2
-rw-r--r--lib/chef/resource/cron_d.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb
index af55c15090..545d895869 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/_cron.rb
@@ -18,6 +18,7 @@ cron_d "name_of_cron_entry" do
hour "8"
weekday "6"
mailto "admin@example.com"
+ command "/bin/true"
action :create
end
@@ -27,6 +28,7 @@ cron_d "name_of_cron_entry" do
day "*"
month "11"
weekday "1-5"
+ command "/bin/true"
action :create
end
diff --git a/lib/chef/resource/cron_d.rb b/lib/chef/resource/cron_d.rb
index 34820820d9..a3225c8fdb 100644
--- a/lib/chef/resource/cron_d.rb
+++ b/lib/chef/resource/cron_d.rb
@@ -60,6 +60,7 @@ class Chef
hour '8'
weekday '6'
mailto 'admin@example.com'
+ command "/bin/true"
action :create
end
```
@@ -73,6 +74,7 @@ class Chef
day '*'
month '11'
weekday '1-5'
+ command "/bin/true"
action :create
end
```