Skip to content

Commit

Permalink
Tools: resolve symlinks in IDF_PATH when installing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
simpkins authored and Marek Fiala committed Jul 19, 2022
1 parent de3990f commit ff75c4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ff75c4f

Please sign in to comment.