diff options
author | John McCrae <jmccrae@chf.io> | 2022-05-08 13:01:24 +0600 |
---|---|---|
committer | John McCrae <jmccrae@chf.io> | 2022-05-08 13:01:24 +0600 |
commit | c1f5e7b6439d406b313de80b54c871ae81187f62 (patch) | |
tree | 8837a76aef6523e38f4c49fe9ad263eef908dfdb | |
parent | ea624287c601067036cfe311e4499011227fe461 (diff) | |
download | chef-c1f5e7b6439d406b313de80b54c871ae81187f62.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 | 55 |
1 files changed, 5 insertions, 50 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb index 0d5e7d00bd..0f5174d487 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/macos.rb @@ -69,26 +69,9 @@ end ### Begin MacOS nonsense # What you see below here is a pile of crazy. # The End-To-End recipe wants to update git on MacOS to the latest version. -# MacOS doesn't like this. We get back symlink update errors et al -# We then have to use this crazy to take control of enough of the OS -# to update git without actually hurting anything. UGH - -user "tempadmin" do - gid 80 - shell "/bin/zsh" - password "password" -end - -sudo "passwordless-access to change git ownership" do - commands ["ALL"] - nopasswd true - users "tempadmin" -end - -execute "which fucking git" do - command "which git" - live_stream true -end +# MacOS doesn't like this. We get back symlink update errors, et al +# We then have to use this to take control of enough of the OS +# to update git without actually hurting anything else. UGH file "/usr/local/var/homebrew/locks/git@2.35.1.formula.lock" do mode "0777" @@ -100,46 +83,18 @@ file "/usr/local/Cellar/git@2.35.1/2.35.1/etc/bash_completion.d/git-completion.b owner "root" end -# /usr/local/Cellar/git@2.35.1/2.35.1/etc/bash_completion.d/git-completion.bash - execute "changing ownership of the git cask" do command "chmod -R 777 /usr/local/Cellar/git@2.35.1" live_stream true end -execute "show the list of offending folders" do - command "ls -al /usr/local/Cellar/git@2.35.1/2.35.1/etc/bash_completion.d" - live_stream true -end - -execute "show the list of offending folders" do +execute "Sledge Hammer removal of the offending Git version" do command "rm -rf /usr/local/Cellar/git@2.35.1" live_stream true end -# execute "where or where is the git cask" do -# command "ls -al /usr/local/Cellar" -# 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 -# EOH -# user "tempadmin" -# end - -user "tempadmin" do - action :remove -end - ### End MacOS nonsense +# Now back to your regularly scheduled build, now in progress. include_recipe "git" |