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: execute files command within configured root #607

Conversation

mrexox
Copy link
Member

@mrexox mrexox commented Jan 12, 2024

Closes #292

🔧 Summary

Execute files from within a configured root in case it contains a path to a script. This is a breaking change.

@mrexox mrexox marked this pull request as ready for review January 12, 2024 09:37
@jameslporter
Copy link

Are the files passed in staged_files corrected to be relative to the defined root path? That's my pain point, had to make a gnarly shell script to chop client/ off the beginning of our paths.

@mrexox
Copy link
Member Author

mrexox commented Jan 22, 2024

@jameslporter , yes, files are being filtered by root option: https://github.com/evilmartians/lefthook/blob/master/internal/lefthook/run/filter/filters.go#L22

@mrexox mrexox force-pushed the fix/execute-files-command-within-configured-root branch from 356b2f6 to 31e7834 Compare April 8, 2024 07:39
@mrexox mrexox force-pushed the fix/execute-files-command-within-configured-root branch from 31e7834 to 98e852e Compare April 9, 2024 09:39
@mrexox mrexox force-pushed the fix/execute-files-command-within-configured-root branch from 98e852e to 5251071 Compare October 22, 2024 08:22
@mrexox mrexox merged commit 5afb245 into evilmartians:master Oct 22, 2024
19 checks passed
@mrexox mrexox deleted the fix/execute-files-command-within-configured-root branch October 22, 2024 08:30
mrexox added a commit to anthony-hayes/lefthook that referenced this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run files cmd with root parameter
2 participants