diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2021-03-18 10:26:11 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2021-03-18 10:35:51 -0700 |
commit | 2d88d96b2cfeabd9eaa5350a1f8b90e54632923c (patch) | |
tree | 5c86b235c9a011fdb5993f34ca91df3fedddea04 /spec/functional | |
parent | 12265fccc388abe416d89e1f06df546d6b024747 (diff) | |
download | chef-2d88d96b2cfeabd9eaa5350a1f8b90e54632923c.tar.gz |
ruby 3.0 fixes and post-bundle-install hook
Mostly this is all fixes necessary for ruby 3.0
There's the addition of the appbundle hook which lets us better pull
git gems into appbundler
Note carefully how after adding the post-bundle-install.rb that
trying to pre appbundle-update ohai pulls in chef/chef as bundle
installed git gem which fails to install so we go back to only
using one appbundle-update on chef/chef and removing the chef/ohai
one (which may fix other bugs).
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/functional')
-rw-r--r-- | spec/functional/resource/chocolatey_package_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/functional/resource/chocolatey_package_spec.rb b/spec/functional/resource/chocolatey_package_spec.rb index e55c1a453c..b5f4c07831 100644 --- a/spec/functional/resource/chocolatey_package_spec.rb +++ b/spec/functional/resource/chocolatey_package_spec.rb @@ -41,6 +41,19 @@ describe Chef::Resource::ChocolateyPackage, :windows_only, :choco_installed do provider end + # This bit of magic ensures that we pass a mixed-case Path var in the env to chocolatey and not PATH + # (both ENV["PATH"] and ENV["Path"] are the same thing in ruby-on-windows, and the first created key + # is the one that is actually passed to a subprocess, and choco demands it be Path) + # + # This is not a no-op. + # + # I don't know how to tell what state we were in to begin with, so we cannot restore. Nothing else + # seems to care. + # + before(:all) do + ENV["Path"] = ENV.delete("Path") + end + context "installing a package" do after { remove_package } |