diff --git a/tools/ci/check_build_test_rules.py b/tools/ci/check_build_test_rules.py index 97063ba442..2a9c242aa7 100755 --- a/tools/ci/check_build_test_rules.py +++ b/tools/ci/check_build_test_rules.py @@ -406,6 +406,9 @@ if __name__ == '__main__': arg = parser.parse_args() + # Since this script is executed from the pre-commit hook environment, make sure IDF_PATH is set + os.environ['IDF_PATH'] = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) + if arg.action == 'sort-yaml': sort_yaml(arg.files) else: