Skip to content

Commit

Permalink
Merge branch 'bugfix/removed_working_directory_error' into 'master'
Browse files Browse the repository at this point in the history
Tools bugfix: Removed working directory when using idf.py

Closes IDFGH-10210

See merge request espressif/esp-idf!24065
  • Loading branch information
dobairoland committed Jun 9, 2023
2 parents 4b35e00 + ae99820 commit 99772e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/idf.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ def main() -> None:
# Check the environment only when idf.py is invoked regularly from command line.
checks_output = None if SHELL_COMPLETE_RUN else check_environment()

# Check existance of the current working directory to prevent exceptions from click cli.
try:
os.getcwd()
except FileNotFoundError as e:
raise FatalError(f'ERROR: {e}. Working directory cannot be established. Check it\'s existence.')

try:
cli = init_cli(verbose_output=checks_output)
except ImportError:
Expand Down

0 comments on commit 99772e6

Please sign in to comment.