summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <jmccrae@chf.io>2022-05-08 08:02:49 +0600
committerJohn McCrae <jmccrae@chf.io>2022-05-08 08:02:49 +0600
commit4a7f2da6a45fb83ecf7982c165db3f5095000605 (patch)
tree5da34dc92ca200b1379ec52aa96d2ba91c9b608a
parentbd99fcf6bf420afce128db54d37e8b4ec5a38798 (diff)
downloadchef-4a7f2da6a45fb83ecf7982c165db3f5095000605.tar.gz
Updated the recipe to remove Git completely before updating it.
Signed-off-by: John McCrae <jmccrae@chf.io>
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/macos.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
index d22d8c230c..7fb71252f1 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
@@ -78,12 +78,18 @@ sudo 'passwordless-access to change git ownership' do
users "tempadmin"
end
+execute "which fucking git" do
+ command "which git"
+ live_stream true
+end
+
# We're overcoming a problem where Homebrew updating Git on MacOS throws a symlink error
# We remove git completely to allow homebrew to update it.
bash "remove git" do
code <<~EOH
# echo "password" | sudo chown -R $(whoami) $(brew --prefix)/*
- brew list --full-name | grep '^git@' | brew uninstall --ignore-dependencies
+ # brew list --full-name | grep '^git@' | xargs brew uninstall --ignore-dependencies
+ brew uninstall git@2.35.1 --ignore dependencies
EOH
user "tempadmin"
end