Fish 下报错 Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.

在用fish激活virualenv虚拟环境时,使用命令: source ./venv/bin/activate 报错

./venv/bin/activate (line 23): Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.

if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then

^

from sourcing file ./venv/bin/activate

called on standard input

source: Error while reading file './venv/bin/activate'

解决方法:

https://github.com/pypa/virtualenv/issues/886

替换activate为activate.fish

上一篇:APP测试流程


下一篇:记工作中的git遇到的问题