summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorVasu1105 <vasundhara.jagdale@msystechnologies.com>2020-02-05 22:02:06 -0800
committerVasu1105 <vasundhara.jagdale@msystechnologies.com>2020-02-23 23:09:55 -0800
commit39bd22505b847ff305ca4a6c58b0c0a64c367e44 (patch)
tree4087e9dc6b4b66ce6cf944bb3b0a917b7003fc2c /lib/chef
parent7a4b9d78051f6ed46b9434c2fa733d4ca27cbf5b (diff)
downloadchef-39bd22505b847ff305ca4a6c58b0c0a64c367e44.tar.gz
Replaced powershell_out with powershell_exec and updated data type for sensitive class
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/windows_user_privilege.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/windows_user_privilege.rb b/lib/chef/resource/windows_user_privilege.rb
index c5538c7e19..b1955bd43b 100644
--- a/lib/chef/resource/windows_user_privilege.rb
+++ b/lib/chef/resource/windows_user_privilege.rb
@@ -1,7 +1,7 @@
#
# Author:: Jared Kauppila (<jared@kauppi.la>)
# Author:: Vasundhara Jagdale(<vasundhara.jagdale@chef.io>)
-# Copyright 2008-2019, Chef Software, Inc.
+# Copyright 2008-2020, Chef Software, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ class Chef
},
}
- property :sensitive, [true, false], default: true
+ property :sensitive, [TrueClass, FalseClass], default: true
load_current_value do |new_resource|
unless new_resource.principal.nil?
@@ -111,7 +111,7 @@ class Chef
raise Chef::Exceptions::ValidationFailed, "Users are required property with set action."
end
- if powershell_out!("Get-PackageSource -Name PSGallery").stdout.empty? || powershell_out!("(Get-Package -Name cSecurityOptions -WarningAction SilentlyContinue).name").stdout.empty?
+ if powershell_exec("(Get-PackageSource -Name PSGallery).name").result.empty? || powershell_exec("(Get-Package -Name cSecurityOptions -WarningAction SilentlyContinue).name").result.empty?
raise "This resource needs Powershell module cSecurityOptions to be installed. \n Please install it and then re-run the recipe. \n https://www.powershellgallery.com/packages/cSecurityOptions/3.1.3"
end