summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTor Magnus Rakvåg <tor.magnus@outlook.com>2018-12-07 09:46:42 +0100
committerTor Magnus Rakvåg <tor.magnus@outlook.com>2018-12-07 09:46:42 +0100
commitfd3d50270a14f47d11581380bd210f0658a4edf1 (patch)
treef7eac559e5fbae3318fbbb30ba8cdd7c546f7757 /lib
parent71f2f8461b1e354d22b595882dd8646a30cccdba (diff)
downloadchef-fd3d50270a14f47d11581380bd210f0658a4edf1.tar.gz
suppress more useless warnings
Signed-off-by: Tor Magnus Rakvåg <tor.magnus@outlook.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/resource/powershell_package_source.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/powershell_package_source.rb b/lib/chef/resource/powershell_package_source.rb
index ce29322f9f..061b9e632d 100644
--- a/lib/chef/resource/powershell_package_source.rb
+++ b/lib/chef/resource/powershell_package_source.rb
@@ -116,7 +116,7 @@ class Chef
action_class do
def package_source_exists?
- cmd = powershell_out!("(Get-PackageSource -Name '#{new_resource.source_name}').Name")
+ cmd = powershell_out!("(Get-PackageSource -Name '#{new_resource.source_name}' -WarningAction SilentlyContinue).Name")
cmd.stdout.downcase.strip == new_resource.source_name.downcase
end