summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorTor Magnus Rakvåg <tm@intility.no>2018-02-12 14:08:17 +0100
committerTor Magnus Rakvåg <tm@intility.no>2018-02-12 14:20:19 +0100
commit67fd2daf3151fd3a6eaee90a11aa5792e01e8159 (patch)
tree3b6a4c3ddf8681a27dc17c15e8628ad61d33e75e /lib/chef/provider
parentbaba34bdf0fd079f6bde0f7f0f28929c084543ba (diff)
downloadchef-67fd2daf3151fd3a6eaee90a11aa5792e01e8159.tar.gz
add source param
Signed-off-by: Tor Magnus Rakvåg tm@intility.no
Diffstat (limited to 'lib/chef/provider')
-rw-r--r--lib/chef/provider/package/powershell.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/provider/package/powershell.rb b/lib/chef/provider/package/powershell.rb
index 9fe3e52b24..eb65d80e3d 100644
--- a/lib/chef/provider/package/powershell.rb
+++ b/lib/chef/provider/package/powershell.rb
@@ -115,9 +115,14 @@ class Chef
command.push(arg)
end
command.push("-RequiredVersion #{version}") if version
+ command.push("-Source #{new_resource.source}") if new_resource.source && command[1] =~ Regexp.union(/Install-Package/, /Find-Package/)
command.push(").Version")
command.join(" ")
end
+
+ def check_resource_semantics!
+ # This validation method from Chef::Provider::Package does not apply here, so no-op it.
+ end
end
end
end