From 93edcf1883b0ad7f4e897489ce6da1a46f9604a2 Mon Sep 17 00:00:00 2001 From: Chen Wu Date: Mon, 23 Dec 2024 17:26:17 +0800 Subject: [PATCH] tools: Fixed an incorrect usage on checking executables --- tools/ci/check_executables.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ci/check_executables.py b/tools/ci/check_executables.py index 2732b9345..7f22d0334 100755 --- a/tools/ci/check_executables.py +++ b/tools/ci/check_executables.py @@ -24,15 +24,15 @@ def _strip_each_item(iterable: Iterable) -> List: return res -IDF_PATH = os.getenv('IDF_PATH', os.getcwd()) -EXECUTABLE_LIST_FN = os.path.join(IDF_PATH, 'tools/ci/executable-list.txt') +repo_dir = os.getcwd() +EXECUTABLE_LIST_FN = os.path.join(repo_dir, 'tools/ci/executable-list.txt') known_executables = _strip_each_item(open(EXECUTABLE_LIST_FN).readlines()) def check_executable_list() -> int: ret = 0 for index, fn in enumerate(known_executables): - if not os.path.exists(os.path.join(IDF_PATH, fn)): + if not os.path.exists(os.path.join(repo_dir, fn)): print('{}:{} {} not exists. Please remove it manually'.format(EXECUTABLE_LIST_FN, index + 1, fn)) ret = 1 return ret