Skip to content

Commit 89e60fe

Browse files
committed
[fix] language_package.sh, fix pipenv did not save PATH in the user's shell.
1 parent 28a4954 commit 89e60fe

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

language_package.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export PATH="$PYENV_ROOT/bin:$PATH"
9898
if command -v pyenv 1>/dev/null 2>&1; then
9999
eval "$(pyenv init -)"
100100
fi'
101+
pipenv_Keyword='export PATH=~/.local/bin:$PATH'
102+
101103
case $SHELL in
102104
*zsh )
103105
shell=zsh
@@ -132,7 +134,13 @@ fi
132134

133135
Ask_yn "Do you want to install pipenv?"; result=$?
134136
if [ $result = 1 ]; then
135-
pip install pipenv
137+
pip install --user pipenv
138+
if [ "$(grep -xn "$pipenv_Keyword" $profile)" != "" ]; then
139+
Echo_Color g "You have already added pipenv PATH in $profile !!"
140+
else
141+
# config profile
142+
printf "\n# pipenv setting\n$pipenv_Keyword\n" >> $profile
143+
fi
136144
fi
137145

138146
Ask_yn "Do you want to install nvm?"; result=$?

0 commit comments

Comments
 (0)