Skip to content

Commit

Permalink
tools: Create the ".espressif" directory on the first run on clean sy…
Browse files Browse the repository at this point in the history
…stem

Closes #7848
  • Loading branch information
dobairoland committed Nov 9, 2021
1 parent 98d34e5 commit c652c1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/idf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,9 @@ def export_targets_to_idf_env_json(targets): # type: (list[str]) -> None
break

try:
if global_idf_tools_path: # mypy fix for Optional[str] in the next call
# the directory doesn't exist if this is run on a clean system the first time
mkdir_p(global_idf_tools_path)
with open(os.path.join(global_idf_tools_path, IDF_ENV_FILE), 'w') as w: # type: ignore
json.dump(idf_env_json, w, indent=4)
except (IOError, OSError):
Expand Down

0 comments on commit c652c1d

Please sign in to comment.