summaryrefslogtreecommitdiff
path: root/lib/chef/resource/homebrew_cask.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-03 20:30:44 -0700
committerTim Smith <tsmith@chef.io>2018-11-03 20:45:37 -0700
commit2bb9b40c036caf626635292541516e9663151cd0 (patch)
tree2eda7c29509fd5eb98413fc15e2e8b606bf864b0 /lib/chef/resource/homebrew_cask.rb
parentbab2c55cd1566c28981d3ffd89326215f15c5fb4 (diff)
downloadchef-2bb9b40c036caf626635292541516e9663151cd0.tar.gz
Add more validation_messages to propertiesvalidations
Provide users with more helpful messages Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/homebrew_cask.rb')
-rw-r--r--lib/chef/resource/homebrew_cask.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/resource/homebrew_cask.rb b/lib/chef/resource/homebrew_cask.rb
index 626ae02a69..7c47fbbfcd 100644
--- a/lib/chef/resource/homebrew_cask.rb
+++ b/lib/chef/resource/homebrew_cask.rb
@@ -34,6 +34,7 @@ class Chef
property :cask_name, String,
description: "The name of the Homebrew cask, if it differs from the resource block name.",
regex: %r{^[\w/-]+$},
+ validation_message: "The provided Homebrew cask name is not valid. Cask names can contain alphanumeric characters, _, -, or / only!",
name_property: true
property :options, String,