diff options
author | Derek Groh <derekgroh@gmail.com> | 2018-11-16 14:37:00 -0600 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-11-27 17:22:24 -0800 |
commit | 60e50b566afcb17f5d265607cba747594ec2f648 (patch) | |
tree | c3a1a928fcd3b106ddd4abfce5fb48ccce2ff3a4 | |
parent | 852b6eb69e9d11acd32c6d756dfbb9473d97a4ac (diff) | |
download | chef-60e50b566afcb17f5d265607cba747594ec2f648.tar.gz |
add compress flag to address bug in PS version 4
Signed-off-by: Derek Groh <derekgroh@github.com>
-rw-r--r-- | lib/chef/resource/windows_share.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb index 0b245e8590..1fda67e820 100644 --- a/lib/chef/resource/windows_share.rb +++ b/lib/chef/resource/windows_share.rb @@ -102,7 +102,7 @@ class Chef # this command selects individual objects because EncryptData & CachingMode have underlying # types that get converted to their Integer values by ConvertTo-Json & we need to make sure # those get written out as strings - share_state_cmd = "Get-SmbShare -Name '#{desired.share_name}' | Select-Object Name,Path, Description, Temporary, CATimeout, ContinuouslyAvailable, ConcurrentUserLimit, EncryptData | ConvertTo-Json" + share_state_cmd = "Get-SmbShare -Name '#{desired.share_name}' | Select-Object Name,Path, Description, Temporary, CATimeout, ContinuouslyAvailable, ConcurrentUserLimit, EncryptData | ConvertTo-Json -Compress" Chef::Log.debug("Running '#{share_state_cmd}' to determine share state'") ps_results = powershell_out(share_state_cmd) @@ -126,7 +126,7 @@ class Chef encrypt_data results["EncryptData"] # folder_enumeration_mode results['FolderEnumerationMode'] - perm_state_cmd = %{Get-SmbShareAccess -Name "#{desired.share_name}" | Select-Object AccountName,AccessControlType,AccessRight | ConvertTo-Json} + perm_state_cmd = %{Get-SmbShareAccess -Name "#{desired.share_name}" | Select-Object AccountName,AccessControlType,AccessRight | ConvertTo-Json -Compress} Chef::Log.debug("Running '#{perm_state_cmd}' to determine share permissions state'") ps_perm_results = powershell_out(perm_state_cmd) |