changed-files
changed-files copied to clipboard
[Feature] Git version dependency
Is this feature missing in the latest version?
- [X] I'm using the latest release
Is your feature request related to a problem? Please describe.
I'm using self-hosted runners on a machine with Ubuntu 18.04. The default git version is 2.17. When using this action I kept seeing the following errors:
Error: Unable to locate the current sha: ...
Error: You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage
Error: Process completed with exit code 1.
I tried 'fetch-depth: 0' and 'fetch-depth: 2' and was still getting the same error. Tuns out git version 2.17 doesn't have the command git rev-parse
(https://github.com/tj-actions/changed-files/blob/main/diff-sha.sh#L35). Updating git to the latest version fixed the problem.
Describe the solution you'd like?
Two things come to mind:
- Specify the minimum required git version in the README
- Check that the git version is above the minimum and raise a better error message if it's not
Describe alternatives you've considered?
No response
Anything else?
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience.