summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-08 12:19:13 -0800
committerTim Smith <tsmith@chef.io>2017-12-08 12:19:13 -0800
commit87a7f7d58b183d4af511c3ef496c8559fc808625 (patch)
tree382b0809dfa7d8c927082c81cc1bc6f5aec78366 /lib/chef
parentd91dc1cce0efa2d00bfbe37ecbcd154500c99986 (diff)
downloadchef-87a7f7d58b183d4af511c3ef496c8559fc808625.tar.gz
Fix the time regex and improve the error message
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/windows_task.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb
index b205a50a6b..c9e8448938 100644
--- a/lib/chef/resource/windows_task.rb
+++ b/lib/chef/resource/windows_task.rb
@@ -117,7 +117,7 @@ class Chef
def validate_start_time(start_time, frequency)
if start_time
raise ArgumentError, "`start_time` property is not supported with `frequency :none`" if frequency == :none
- raise ArgumentError, "`start_time` property must be in the HH:mm format." unless /^[0-2][0-3]:[0-5][0-9]$/.match?(start_time)
+ raise ArgumentError, "`start_time` property must be in the HH:mm format (e.g. 6:20pm -> 18:20)." unless /^[0-2][0-9]:[0-5][0-9]$/.match?(start_time)
else
raise ArgumentError, "`start_time` needs to be provided with `frequency :once`" if frequency == :once
end