tools: bugfix export.sh change IDF_PATH only if file is esp-idf

Set the self_path where the export.sh script is located, not the sourcing directory.
This commit is contained in:
Marek Fiala
2022-03-14 15:15:35 +01:00
parent e3c084a2dc
commit 029de43db3
3 changed files with 23 additions and 25 deletions

View File

@@ -1199,9 +1199,10 @@ def deactivate_statement(args): # type: (list[str]) -> None
if 'sha' in idf_env_json['idfInstalled']:
try:
idf_env_json['idfInstalled'].pop('sha')
if idf_env_json['idfPreviousId'] == 'sha':
idf_env_json['idfPreviousId'] = ''
if idf_env_json['idfSelectedId'] == 'sha':
idf_env_json['idfSelectedId'] = active_repo_id()
idf_env_json['idfPreviousId'] = ''
return
finally:
save_idf_env(idf_env_json)