diff options
author | John McCrae <jmccrae@chf.io> | 2022-05-08 09:20:37 +0600 |
---|---|---|
committer | John McCrae <jmccrae@chf.io> | 2022-05-08 09:20:37 +0600 |
commit | 834f6310e0aeb9649fbe448f6f576bc4fc31a35a (patch) | |
tree | a7a302f675e15d885f1c900f5287f770b8be62ee | |
parent | f9ec43e0e7db0e68fd2937badd9548ee2ea83158 (diff) | |
download | chef-834f6310e0aeb9649fbe448f6f576bc4fc31a35a.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.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb index 0c6619c28d..43a748ebc7 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -83,18 +83,27 @@ execute "which fucking git" do live_stream true end +file '/usr/local/var/homebrew/locks/git@2.35.1.formula.lock' do + mode '0777' + owner 'root' +end + +# execute "changing ownership of the git cask" do +# command "chown $USER /usr/local/var/homebrew/locks/git@2.35.1.formula.lock" +# 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@' | xargs brew uninstall --ignore-dependencies - # brew uninstall git@2.35.1 --ignore-dependencies - which git - echo $PATH + brew uninstall git@2.35.1 --ignore-dependencies + # which git + # echo $PATH EOH user "tempadmin" - live_stream true end user "tempadmin" do |