Merge branch 'bugfix/idf_tools_guess_idf_path' into 'master'

idf_tools.py: when guessing IDF_PATH, set it in the enviroment

Closes IDF-1141 and IDFGH-2189

See merge request espressif/esp-idf!6752
This commit is contained in:
Ivan Grokhotkov 2019-11-21 20:30:08 +08:00
commit 1be70588f3

View file

@ -1311,6 +1311,7 @@ def main(argv):
global_idf_path = args.idf_path global_idf_path = args.idf_path
if not global_idf_path: if not global_idf_path:
global_idf_path = os.path.realpath(os.path.join(os.path.dirname(__file__), "..")) global_idf_path = os.path.realpath(os.path.join(os.path.dirname(__file__), ".."))
os.environ['IDF_PATH'] = global_idf_path
global global_idf_tools_path global global_idf_tools_path
global_idf_tools_path = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(IDF_TOOLS_PATH_DEFAULT) global_idf_tools_path = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(IDF_TOOLS_PATH_DEFAULT)