-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix double project idf_ext.py loading (IDFGH-3287) #5278
Conversation
@BrianPugh Thanks for your contribution. |
Hi @BrianPugh I thought twice and realised that making path as a set is not a good idea, extension_dirs = [realpath(idf_py_extensions_path)]
extra_paths = os.environ.get("IDF_EXTRA_ACTIONS_PATH")
if extra_paths is not None:
for path in extra_paths.split(';'):
path = realpath(path)
if path not in extension_dirs:
extension_dirs.append(path)
extensions = {} Could you please update the PR? |
updated! |
tools/idf.py
Outdated
extra_paths = os.environ.get("IDF_EXTRA_ACTIONS_PATH", "").split(';') | ||
extension_dirs = [idf_py_extensions_path] + extra_paths | ||
extensions = {} | ||
# Make a set to automatically handle duplicate paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't make sense anymore,
and could you remove it and squish all commits into one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and squashed
…d cwd if IDF_EXTRA_ACTIONS_PATH is not set.
54e1e88
to
34a9238
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you
…d cwd if IDF_EXTRA_ACTIONS_PATH is not set. Merges #5278
merged in 3a6b8bb |
Fixes the issue described in #5193 . I did not combine the project extension loading with the generic built-in extension loading since it'd be slightly backward incompatible (but would have reduced ~10 lines of code).