Merge branch 'bugfix/check_readmes_pre_commit_idf_path' into 'master'

ci: allow running check-readmes pre-commit hook without IDF_PATH set

See merge request espressif/esp-idf!19055
This commit is contained in:
Ivan Grokhotkov 2022-07-19 04:46:30 +08:00
commit eeb2808a32

View File

@ -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: