Skip to content

Commit

Permalink
fix: skip user PATH prefixed python versions for virtualenvwrapper (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiHoewelmeyer-TomTom authored Nov 23, 2021
1 parent 265b336 commit 79c94ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions virtualenvwrapper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ elif [[ "$(lsb_release -i)" == *"Ubuntu"* ]]; then
fi

# Not using in place editing as macOS and GNU sed
# have incompatible -i options.
# have incompatible -i options.
touch ~/.zprofile
sed "/^export VIRTUALENVWRAPPER_PYTHON.*$/d" ~/.zprofile > ~/.zprofilenew
echo "export VIRTUALENVWRAPPER_PYTHON=$(which python3)" >> ~/.zprofilenew
mv ~/.zprofilenew ~/.zprofile
# Using "sudo which" to bypass any user PATH prefixed python versions
echo "export VIRTUALENVWRAPPER_PYTHON=$(sudo which python3)" >> ~/.zprofilenew
mv ~/.zprofilenew ~/.zprofile

0 comments on commit 79c94ba

Please sign in to comment.