[Answer]-Virtualenv and workon command – odd behavior in bash script

1👍

Based on @that other guy’s comment, I was able to debug the bash script and get some clues to the issue. Turns out that for some reason (maybe in my fiddling with the script or maybe for some other reason) there was a file called .project in the virtual environment that held the string one_of_my_other_projects. I first changed it to say new_project but this then just cded into that directory and caused a path issue.

I deleted the file (with my fingers crossed) and it worked.

The way I found out that was the problem was that the debug ode showed the virtualenv script doing a cat on that file. Not sure why, because it seems to not actually accomplish anything useful. Once I looked inside, I discovered my problem.

If @that other guy poses an answer to this question with his comment, I’d be happy to accept it. Otherwise, this answer will be present to help anyone else with a similar problem.

Thanks.

Leave a comment