virtualenvwrapper.sh doesn't source properly on Windows using WSL

Issue #304 resolved
Patrick Aikens
created an issue

I have ZSH set as my shell for WSL. When I run virtualenvwrapper.sh, I get the following error:

/usr/local/bin/virtualenvwrapper.sh: 95: /usr/local/bin/virtualenvwrapper.sh: Bad substitution.

From my prompt, if I run echo $ZSH_VERSION, I get 5.0.2. I have done some tests, and it seems like shell scripts aren't being run by the current shell. I made a test script with the following contents:

echo $ZSH_VERSION

When running this, there's no output. If I change it to

#! /bin/zsh
echo $ZSH_VERSION

I get 5.0.2 as expected. I haven't been able to determine why this is working this way on WSL, but I can execute ZSH_VERSION=5.0.2 virtualenvwrapper.sh, and as I expected I get farther but the script dies later on when expecting the currently running shell to have ZSH functionality.

Comments (2)

  1. Patrick Aikens reporter

    I'm going to resolve this... I was trying to test virtualenvwrapper from the command line by sourcing it directly and it was giving me issues. Doing it the right way from my .zshrc is working, so it's probably not worth spending much more time on.

  2. Log in to comment