From 07f21326898a2681a8b90d0495476f3bf988ec7f Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 3 Jan 2019 19:18:21 -0500 Subject: [PATCH] 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 --- venv-activate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/venv-activate.sh b/venv-activate.sh index 64f9b72eeb..d1e7bcb44e 100644 --- a/venv-activate.sh +++ b/venv-activate.sh @@ -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.