mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/removed_working_directory_error_v5.1' into 'release/v5.1'
Tools bugfix: Removed working directory when using idf.py (v5.1) See merge request espressif/esp-idf!24150
This commit is contained in:
commit
c8ea97984f
@ -691,6 +691,12 @@ def main() -> None:
|
|||||||
# Check the environment only when idf.py is invoked regularly from command line.
|
# Check the environment only when idf.py is invoked regularly from command line.
|
||||||
checks_output = None if SHELL_COMPLETE_RUN else check_environment()
|
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 its existence.')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cli = init_cli(verbose_output=checks_output)
|
cli = init_cli(verbose_output=checks_output)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
Loading…
Reference in New Issue
Block a user