c3cc13b3acf6e34f4dcf4aadd0b0e71b1d84b59f
- Author
- Michael Aquilina <michaelaquilina@gmail.com>
- Committer
- Michael Aquilina <michaelaquilina@gmail.com>
- Date
Message
Only create .venv file after everything is completed
Diff
1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
2index ada04a71f696eb82fc6920bea7f598817177dc79..be585b8286c86d2d99d52d11e4bdee017294c663 100644
3--- a/autoswitch_virtualenv.plugin.zsh
4+++ b/autoswitch_virtualenv.plugin.zsh
5@@ -65,7 +65,6 @@ function mkvenv()
6 echo ".venv file already exists. If this is a mistake use the rmvenv command"
7 else
8 venv_name="$(basename $PWD)"
9- echo "$venv_name" > ".venv"
10 mkvirtualenv "$venv_name" $@
11 if [[ -f "requirements.txt" ]]; then
12 printf "Found a requirements.txt. Install? (Y/n): "
13@@ -74,5 +73,6 @@ function mkvenv()
14 pip install -r requirements.txt
15 fi
16 fi
17+ echo "$venv_name" > ".venv"
18 fi
19 }