Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up old docker desktop broken symlink before rancher install (#86)
@chadgh and @ark134 both hit this "Permission denied" issue while they were reinstalling rancher: ``` ==> Moving App 'Rancher Desktop.app' to '/Applications/Rancher Desktop.app' :beer: ih-rancher was successfully installed! ==> `brew cleanup` has not been run in the last 30 days, running now... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins WARN: Could not install Rancher Desktop ``` Seems like the best way to handle this is by deleting the broken symlink: https://stackoverflow.com/a/75141533 Here's what I see locally, which confirms docker leaves this broken after uninstalling: ``` $ ls -hal /usr/local/lib/docker/cli-plugins lrwxr-xr-x 1 root wheel 55B Jan 25 2022 /usr/local/lib/docker/cli-plugins -> /Applications/Docker.app/Contents/Resources/cli-plugins $ ls -hal /Applications/Docker.app/Contents/Resources/cli-plugins ls: /Applications/Docker.app/Contents/Resources/cli-plugins: No such file or directory ``` This PR adds some additional clean-up logic to the clean up the broken symlink before proceeding with the rancher install.
- Loading branch information