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 environmentpull/1931/head
parent
dcbda23482
commit
07f2132689
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue