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-30 16:18:59 -0700
commitb05203e599f1d66987d1e695a9e86bdd73009fd0 (patch)
treec8a20c1a1b4fa38e74f57cda9002c6c323a431dd
parentdac0b235fbf912899373c2361d2e3d594b1e0d70 (diff)
downloadchef-b05203e599f1d66987d1e695a9e86bdd73009fd0.tar.gz
Allow passing array to supports in mount againarray_mount
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 }