Use builtin cd for venv-activate.sh

`builtin cd` is safer, as simple `cd` may fail when cd is aliased to something
that outputs to stdout in the local environment
pull/1931/head
adam 2019-01-03 19:18:21 -05:00
parent dcbda23482
commit 07f2132689
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ function main() {
# Prevent running in script then exiting immediately
echo "ERROR: Invoke with 'source venv-activate.sh' or '. venv-activate.sh'"
else
local SRC_DIR="$( cd "$( dirname "${BASH_SOURCE}" )" ; pwd -P )"
local SRC_DIR="$( builtin cd "$( dirname "${BASH_SOURCE}" )" ; pwd -P )"
source ${SRC_DIR}/.venv/bin/activate
# Provide an easier to find "mycroft-" prefixed command.