Skip to content

Commit 2ae5784

Browse files
mxbrauninashif
authored andcommitted
Make zephyr-env.sh work when cd is aliased
Force the zephyr-env.sh script to invoke the builtin 'cd' command so that the script correctly assigns ZEPHYR_BASE, even for users who alias the 'cd' command. Aliasing 'cd' to emit a string before changing the directory is one way of putting the current working directory in the title of a terminal window. If the user's alias is executed in zephyr-env.sh, the output of 'cd' pollutes ZEPHYR_BASE, resulting in value which won't build. Signed-off-by: Matt Braun <matthew.braun@intel.com> Change-Id: I8d7810d1a44ec14102d07bf35610b47d06ac1015
1 parent 0a58ade commit 2ae5784

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zephyr-env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
# run (if it exists) by this script.
1010

1111
# identify OS source tree root directory
12-
export ZEPHYR_BASE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
12+
export ZEPHYR_BASE=$( builtin cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
1313

1414
scripts_path=${ZEPHYR_BASE}/scripts
1515
echo "${PATH}" | grep -q "${scripts_path}"

0 commit comments

Comments
 (0)