diff options
19 files changed, 1 insertions, 9 deletions
diff --git a/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll b/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll Binary files differindex 0a5d80632c..4b1a0dd692 100644 --- a/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +++ b/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll diff --git a/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll b/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll Binary files differindex 1143fe1175..19f5e0f1ed 100644 --- a/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +++ b/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll diff --git a/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll b/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll Binary files differindex 52beb787b3..e8f475c3dc 100644 --- a/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll +++ b/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll diff --git a/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll b/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll Binary files differindex 0c07278003..573150ab44 100644 --- a/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll +++ b/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll diff --git a/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb b/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb Binary files differindex 2479087bd2..244a59acc4 100644 --- a/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb +++ b/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb diff --git a/distro/ruby_bin_folder/x86/Chef.PowerShell.dll b/distro/ruby_bin_folder/x86/Chef.PowerShell.dll Binary files differindex 70dc1a0318..6e405d878f 100644 --- a/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +++ b/distro/ruby_bin_folder/x86/Chef.PowerShell.dll diff --git a/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll b/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll Binary files differindex 4f243e70bc..f148f6e6a5 100644 --- a/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +++ b/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll diff --git a/distro/ruby_bin_folder/x86/concrt140.dll b/distro/ruby_bin_folder/x86/concrt140.dll Binary files differindex 5649eefca4..1d75093197 100644 --- a/distro/ruby_bin_folder/x86/concrt140.dll +++ b/distro/ruby_bin_folder/x86/concrt140.dll diff --git a/distro/ruby_bin_folder/x86/msvcp140.dll b/distro/ruby_bin_folder/x86/msvcp140.dll Binary files differindex 053520472c..76529d554a 100644 --- a/distro/ruby_bin_folder/x86/msvcp140.dll +++ b/distro/ruby_bin_folder/x86/msvcp140.dll diff --git a/distro/ruby_bin_folder/x86/msvcp140_1.dll b/distro/ruby_bin_folder/x86/msvcp140_1.dll Binary files differindex 3e027a48f2..4dfe3ee783 100644 --- a/distro/ruby_bin_folder/x86/msvcp140_1.dll +++ b/distro/ruby_bin_folder/x86/msvcp140_1.dll diff --git a/distro/ruby_bin_folder/x86/msvcp140_2.dll b/distro/ruby_bin_folder/x86/msvcp140_2.dll Binary files differindex 6baf5a6019..8f251b32cc 100644 --- a/distro/ruby_bin_folder/x86/msvcp140_2.dll +++ b/distro/ruby_bin_folder/x86/msvcp140_2.dll diff --git a/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll b/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll Binary files differnew file mode 100644 index 0000000000..4c758375f7 --- /dev/null +++ b/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll diff --git a/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll b/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll Binary files differindex 128405f0f8..efa73e134b 100644 --- a/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +++ b/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll diff --git a/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll b/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll Binary files differindex 510e99770d..0d282b5d39 100644 --- a/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll +++ b/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.PowerShell.Wrapper.Core.dll diff --git a/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll b/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll Binary files differindex c97035476a..1b53a46076 100644 --- a/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll +++ b/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.dll diff --git a/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb b/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb Binary files differindex fe5122be63..269329e5f2 100644 --- a/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb +++ b/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/3.1.8/Chef.Powershell.Core.pdb diff --git a/distro/ruby_bin_folder/x86/vccorlib140.dll b/distro/ruby_bin_folder/x86/vccorlib140.dll Binary files differindex f41c246b46..f9933d56ac 100644 --- a/distro/ruby_bin_folder/x86/vccorlib140.dll +++ b/distro/ruby_bin_folder/x86/vccorlib140.dll diff --git a/distro/ruby_bin_folder/x86/vcruntime140.dll b/distro/ruby_bin_folder/x86/vcruntime140.dll Binary files differindex 9958562d2d..dc526fc062 100644 --- a/distro/ruby_bin_folder/x86/vcruntime140.dll +++ b/distro/ruby_bin_folder/x86/vcruntime140.dll diff --git a/lib/chef/powershell.rb b/lib/chef/powershell.rb index 4800708dfc..905b92ebfb 100644 --- a/lib/chef/powershell.rb +++ b/lib/chef/powershell.rb @@ -63,15 +63,7 @@ class Chef def exec(script) FFI.ffi_lib @dll FFI.attach_function :execute_powershell, :ExecuteScript, [:string], :pointer - # This is a temporary fix for running in a Habitat environment - # In habitat we set CHEF_POWERSHELL_BIN so that .Net resolves our - # managed shim assembly from the correct location. - # It seems that that is preventing .Net from successfully loading GAC assemblies - # and can break all sorts of edge (and not so edge) scenarios. Once we are actually - # inside the powershell run space, we know our shim was loaded and can unset - # CHEF_POWERSHELL_BIN which will bypass our custom resolver logic. The real fix is - # to fix our resolver. Oh and OH MY GOD this was a pain to track down. - execution = FFI.execute_powershell("$ENV:CHEF_POWERSHELL_BIN=$NULL;#{script}").read_utf16string + execution = FFI.execute_powershell(script).read_utf16string hashed_outcome = Chef::JSONCompat.parse(execution) @result = Chef::JSONCompat.parse(hashed_outcome["result"]) @errors = hashed_outcome["errors"] |