pew-org / pew

A tool to manage multiple virtual environments written in pure python
MIT License
1.17k stars 81 forks source link

pew rm "" remove the WORKON_HOME directory #213

Open Maillol opened 5 years ago

Maillol commented 5 years ago

How to reproduce:

$ pew new e1
  No LICENSE.txt / LICENSE found in source
New python executable in /home/vmaillol/venv/e1/bin/python2
Also creating executable in /home/vmaillol/venv/e1/bin/python
Installing setuptools, pip, wheel...
done.
Launching subshell in virtual environment. Type 'exit' or 'Ctrl+D' to return.
Be aware that this environment will be nested on top of 'e2'
$ pew new e2
  No LICENSE.txt / LICENSE found in source
New python executable in /home/vmaillol/venv/e2/bin/python2
Also creating executable in /home/vmaillol/venv/e2/bin/python
Installing setuptools, pip, wheel...
done.
Launching subshell in virtual environment. Type 'exit' or 'Ctrl+D' to return.
Be aware that this environment will be nested on top of 'e1'
$ ls $WORKON_HOME 
e1  e2
$ pew rm ""

Current result:

Pew remove all the virtualenvs and the directory containing the virtualenvs

$ ls $WORKON_HOME 
ls: cannot access '/home/vmaillol/venv': No such file or directory

Expected result:

pew rm displays an error message if the first parameter is an empty string.