summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-10-27 18:35:16 -0700
committerTim Smith <tsmith@chef.io>2018-10-27 18:35:16 -0700
commitb439716c06ffb69c810813d8d17d47efad09ac4a (patch)
tree9cebd81094e9ec6faaaaeaf3bba80c99da5fba69
parentf343740fbd93812ed9b247b8a7752372ee0ae1fc (diff)
downloadchef-mount_array.tar.gz
Allow passing array to supports in mount againmount_array
We try to coerce the array into a Hash, but we don't allow the Array value. This makes this actually work as we documented it. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/mount.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb
index f3a8af7932..71e23c8cdb 100644
--- a/lib/chef/resource/mount.rb
+++ b/lib/chef/resource/mount.rb
@@ -1,7 +1,7 @@
#
# Author:: Joshua Timberman (<joshua@chef.io>)
# Author:: Tyler Cloke (<tyler@chef.io>)
-# Copyright:: Copyright 2009-2017, Chef Software Inc.
+# Copyright:: Copyright 2009-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -28,7 +28,7 @@ class Chef
allowed_actions :mount, :umount, :unmount, :remount, :enable, :disable
# this is a poor API please do not re-use this pattern
- property :supports, Hash,
+ property :supports, [Array, Hash],
description: "Specify a Hash of supported mount features.",
default: lazy { { remount: false } },
coerce: proc { |x| x.is_a?(Array) ? x.each_with_object({}) { |i, m| m[i] = true } : x }