File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,18 @@ deactivate () {
3939deactivate nondestructive
4040
4141# on Windows, a path can contain colons and backslashes and has to be converted:
42- if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
43-     # transform D:\path\to\venv to /d/path/to/venv on MSYS
44-     # and to /cygdrive/d/path/to/venv on Cygwin
45-     export VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
46- else
47-     # use the path as-is
48-     export VIRTUAL_ENV="__VENV_DIR__"
49- fi
42+ case "$(uname)" in
43+     CYGWIN*|MSYS*)
44+         # transform D:\path\to\venv to /d/path/to/venv on MSYS
45+         # and to /cygdrive/d/path/to/venv on Cygwin
46+         VIRTUAL_ENV=$(cygpath "__VENV_DIR__")
47+         export VIRTUAL_ENV
48+         ;;
49+     *)
50+         # use the path as-is
51+         export VIRTUAL_ENV="__VENV_DIR__"
52+         ;;
53+ esac
5054
5155_OLD_VIRTUAL_PATH="$PATH"
5256PATH="$VIRTUAL_ENV/__VENV_BIN_NAME__:$PATH"
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments