summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/provider/package.rb6
-rw-r--r--lib/chef/provider/package/windows/msi.rb2
-rw-r--r--lib/chef/resource/chocolatey_package.rb5
-rw-r--r--lib/chef/resource/package.rb2
-rw-r--r--lib/chef/resource/windows_package.rb5
5 files changed, 11 insertions, 9 deletions
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb
index 6d4535fff5..c8a1b06a55 100644
--- a/lib/chef/provider/package.rb
+++ b/lib/chef/provider/package.rb
@@ -52,11 +52,7 @@ class Chef
end
def options
- if new_resource.options.is_a?(String)
- new_resource.options.shellsplit
- else
- new_resource.options
- end
+ new_resource.options
end
def check_resource_semantics!
diff --git a/lib/chef/provider/package/windows/msi.rb b/lib/chef/provider/package/windows/msi.rb
index 7e6048ce49..ef8b674b60 100644
--- a/lib/chef/provider/package/windows/msi.rb
+++ b/lib/chef/provider/package/windows/msi.rb
@@ -1,6 +1,6 @@
#
# Author:: Bryan McLellan <btm@loftninjas.org>
-# Copyright:: Copyright 2014-2016, Chef Software, Inc.
+# Copyright:: Copyright 2014-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/lib/chef/resource/chocolatey_package.rb b/lib/chef/resource/chocolatey_package.rb
index 5460661f6d..a443b9a1d7 100644
--- a/lib/chef/resource/chocolatey_package.rb
+++ b/lib/chef/resource/chocolatey_package.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software, Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,6 +31,9 @@ class Chef
@resource_name = :chocolatey_package
end
+ # windows can't take Array options yet
+ property :options, String
+
property :package_name, [String, Array], coerce: proc { |x| [x].flatten }
property :version, [String, Array], coerce: proc { |x| [x].flatten }
diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb
index a1f174a6f3..5647f203d2 100644
--- a/lib/chef/resource/package.rb
+++ b/lib/chef/resource/package.rb
@@ -36,7 +36,7 @@ class Chef
property :package_name, [ String, Array ], identity: true
property :version, [ String, Array ]
- property :options, [ String, Array ]
+ property :options, [ String, Array ], coerce: proc { |x| x.is_a?(String) ? x.shellsplit : x }
property :response_file, String, desired_state: false
property :response_file_variables, Hash, default: lazy { {} }, desired_state: false
property :source, String, desired_state: false
diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb
index 0e8dd39672..e37bad4b0a 100644
--- a/lib/chef/resource/windows_package.rb
+++ b/lib/chef/resource/windows_package.rb
@@ -1,6 +1,6 @@
#
# Author:: Bryan McLellan <btm@loftninjas.org>
-# Copyright:: Copyright 2014-2016, Chef Software, Inc.
+# Copyright:: Copyright 2014-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,6 +37,9 @@ class Chef
@source ||= source(@package_name) if @package_name.downcase.end_with?(".msi")
end
+ # windows can't take array options yet
+ property :options, String
+
# Unique to this resource
property :installer_type, Symbol
property :timeout, [ String, Integer ], default: 600