Skip to content

Commit 8f721ac

Browse files
committed
Fix another unbound variable error with set -u
This should have been part of the fix for pyenv#423, but I missed it because I had PYENV_VIRTUALENV_DISABLE_PROMPT=1 set when doing my own testing.
1 parent 1ee7ca6 commit 8f721ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/pyenv-sh-activate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ if [ -z "${PYENV_VIRTUALENV_DISABLE_PROMPT}" ]; then
229229
echo "pyenv-virtualenv: prompt changing will be removed from future release. configure \`export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior." 1>&2
230230
fi
231231
cat <<EOS
232-
export _OLD_VIRTUAL_PS1="\${PS1}";
233-
export PS1="(${venv}) \${PS1}";
232+
export _OLD_VIRTUAL_PS1="\${PS1:-}";
233+
export PS1="(${venv}) \${PS1:-}";
234234
EOS
235235
;;
236236
esac

0 commit comments

Comments
 (0)