Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repoyjuwxzj5/py_env-python3.10/bin/validate_customizations", line 8, in <module>
sys.exit(main())
File "/home/runner/.cache/pre-commit/repoyjuwxzj5/py_env-python3.10/lib/python3.10/site-packages/test_utils/pre_commit/validate_customizations.py", line 272, in main
exceptions = validate_customizations(set_module)
File "/home/runner/.cache/pre-commit/repoyjuwxzj5/py_env-python3.10/lib/python3.10/site-packages/test_utils/pre_commit/validate_customizations.py", line 253, in validate_customizations
customized_doctypes = get_customized_doctypes()
File "/home/runner/.cache/pre-commit/repoyjuwxzj5/py_env-python3.10/lib/python3.10/site-packages/test_utils/pre_commit/validate_customizations.py", line 23, in get_customized_doctypes
apps_order = apps_order.read_text().split("\n")
File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/pathlib.py", line 1134, in read_text
with self.open(mode='r', encoding=encoding, errors=errors) as f:
File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/sites/apps.txt'
Solutions?:
This will happen anytime the hook is added to a pre-commit file and then run via GHA. I'm guessing we need to recommend a full bench setup to be able run this particular hook inside the GHA context.
I propose that we check for the existence of the frappe-bench application via shutil, then see if "sites", "env" and "apps" exist directories. If both of those things are true, we can probably run it.
Ref: https://github.com/agritheory/shipstation_integration/actions/runs/9460732509/job/26060075732?pr=23
Solutions?:
This will happen anytime the hook is added to a pre-commit file and then run via GHA. I'm guessing we need to recommend a full bench setup to be able run this particular hook inside the GHA context.