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

fix: fix execute permission not applied to hooks on linux machines #25

Conversation

donalfenwick
Copy link
Contributor

@donalfenwick donalfenwick commented Jan 23, 2022

During an install on a linux system a chmod +x command needs to be applied to each hook by the SetExecutablePermission method.
The call to Directory.GetFiles(path).Where(f => !f.Contains(".")) was ignoring any hooks in the husky dir as it was getting the full path and file name for each file. The full path included a dot in the parent folder name /.husky causing the file to be skipped. This change inspects only the file name to ensure the hooks are included in the call to SetExecutablePermission.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@alirezanet alirezanet merged commit d7742c6 into alirezanet:master Jan 23, 2022
@alirezanet
Copy link
Owner

Thanks! 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants