Tools: resolve symlinks in IDF_PATH when installing

Use `pwd -P` to resolve any symlinks in the current directory path.
This makes the behavior in the shell script similar to the idf_tools.py
code, which calls `os.path.realpath()`.  Without this, multiple entries
can get created in the `idfInstalled` dictionary in idf-env.json, and
the installed targets and features are not fully present in all entries.
This results in a broken installation, where `export.sh` cannot set up
the environment correctly afterwards.
This commit is contained in:
Adam Simpkins 2022-07-17 11:18:44 -07:00 committed by Marek Fiala
parent de3990f1c0
commit ff75c4f3b5

View File

@ -4,7 +4,7 @@ set -e
set -u
basedir=$(dirname "$0")
IDF_PATH=$(cd "${basedir}"; pwd)
IDF_PATH=$(cd "${basedir}"; pwd -P)
export IDF_PATH
echo "Detecting the Python interpreter"