Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't follow symlinks when setting Homebrew permissions #110

Merged
merged 1 commit into from
Aug 11, 2024

Conversation

kdkasad
Copy link
Contributor

@kdkasad kdkasad commented Jul 31, 2024

Fixes #107. Fixes #93.

In short, this changes the task which sets the permissions on /opt/homebrew or /usr/local/Homebrew subdirectories so that it no longer follows symlinks.

For a more detailed explanation, see my comment in #107 here.

I have tested this on my machine (M2) but I do not have access to an x86 machine to test on.

The Homebrew directory (/usr/local/Homebrew or /opt/homebrew) contains
symlinks to files outside of that directory tree. For example, casks
link to their respective app in /Applications.

Some of these apps in /Applications contain cyclic directory structures,
which causes a filename-too-long error when Ansible tries to recurse
into those directories.

This commit fixes that problem by setting follow: false, so Ansible will
not follow any links under the Homebrew install path when setting the
permissions of the subdirectories.
@kdkasad
Copy link
Contributor Author

kdkasad commented Jul 31, 2024

Linting fails but not because of changes introduced by this PR. I'd also be happy to fix the linting errors so CI passes, but it would involve changes unrelated to the purpose of this PR.

@geerlingguy geerlingguy merged commit c256e6b into geerlingguy:master Aug 11, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants