diff options
author | Tim Smith <tsmith@chef.io> | 2017-12-08 12:19:13 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-12-08 12:19:13 -0800 |
commit | 87a7f7d58b183d4af511c3ef496c8559fc808625 (patch) | |
tree | 382b0809dfa7d8c927082c81cc1bc6f5aec78366 /lib/chef | |
parent | d91dc1cce0efa2d00bfbe37ecbcd154500c99986 (diff) | |
download | chef-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.rb | 2 |
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 |