-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
check for executables broken on mounted volumes in docker containers on M1 macs #198
Comments
this is a bug in docker for mac and should not be fixed here -- dupe #189 |
Thanks - fair enough! It's a moot point in that case, but out of curiosity, @chriskuehl, is there a reason you use I.e. this line
could have been:
or more verbosely:
I'm not super familiar, but
|
@matyastamas if you look at the blame, the |
Thanks for the quick responses! |
Docker for M1 macs uses gRPC FUSE by default to mount shared volumes which messes up the following chain:
Downstream from this are a lot of pre-commit hooks - e.g. check_executables_have_shebangs:
This likely affects many other hooks that depend on the file type filtering.
The issue has been raised on the docker side, and there is a partial work-around (that I have found to cause docker to freeze frequently to the point of being unusable), but it is unclear when/whether it will ultimately be resolved.
Since many hooks don't install natively on M1 macs yet (often even with rosetta 2), it may not be uncommon for folks to run pre-commit from inside a docker image on a shared volume and encounter this issue.
I noticed that the sys.platform == "win32" branch of the function pre_commit_hooks.check_executables_have_shebangs.check_executables() works correctly on my setup and st_modes on files appear to be set and detected correctly:
The text was updated successfully, but these errors were encountered: