summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVivek Singh <vivek.singh@msystechnologies.com>2019-07-02 17:43:05 -0700
committerVivek Singh <vivek.singh@msystechnologies.com>2019-07-02 17:43:05 -0700
commit4e864bb502c553d73c89b3667a6b9b3e8db1846a (patch)
treef8cfda7fc860a6ba196d199209d4c2ad8eed5cf8 /lib
parentdae77fc75b5646490d9a69a5d36bf87326f18047 (diff)
downloadchef-4e864bb502c553d73c89b3667a6b9b3e8db1846a.tar.gz
Parse day param value into string
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/provider/windows_task.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb
index 83347b764a..49f67d680d 100644
--- a/lib/chef/provider/windows_task.rb
+++ b/lib/chef/provider/windows_task.rb
@@ -446,7 +446,7 @@ class Chef
def days_of_month
days_of_month = []
if new_resource.day
- days = new_resource.day.split(",")
+ days = new_resource.day.to_s.split(",")
days.map! { |day| day.to_s.strip.upcase }
days.delete("LAST") if days.include?("LAST")
days.delete("LASTDAY") if days.include?("LASTDAY")
@@ -466,7 +466,7 @@ class Chef
if new_resource.day
# this line of code is just to support backward compatibility of wild card *
new_resource.day = "mon, tue, wed, thu, fri, sat, sun" if new_resource.day == "*" && new_resource.frequency == :weekly
- days = new_resource.day.split(",")
+ days = new_resource.day.to_s.split(",")
days.map! { |day| day.to_s.strip.upcase }
weeks_days = get_binary_values_from_constants(days, DAYS_OF_WEEK)
else