summaryrefslogtreecommitdiff
path: root/kitchen-tests
diff options
context:
space:
mode:
authorJohn McCrae <jmccrae@chf.io>2022-05-05 16:42:12 +0600
committerJohn McCrae <jmccrae@chf.io>2022-05-05 16:42:12 +0600
commita5fc711e8a67124b02ec0b64744eaa6e765540e7 (patch)
tree4be515202346659cca490b2b62884d3ed262cf92 /kitchen-tests
parentf681917f3cc9343b1181e23b355959562ae61ff2 (diff)
downloadchef-a5fc711e8a67124b02ec0b64744eaa6e765540e7.tar.gz
Updated the recipe to remove Git completely before updating it.
Signed-off-by: John McCrae <jmccrae@chf.io>
Diffstat (limited to 'kitchen-tests')
-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 f27d928155..403e098a47 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb
@@ -72,11 +72,17 @@ user "tempadmin" do
password "password"
end
+sudo 'passwordless-access to change git ownership' do
+ commands ['chown -R $(whoami) $(brew --prefix)/*']
+ nopasswd true
+ users "tempadmin"
+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)/*
+ # echo "password" | sudo chown -R $(whoami) $(brew --prefix)/*
brew unlink git@2.35.1
EOH
user "tempadmin"