Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure virtualenv activates #10618

Merged
merged 1 commit into from Jul 18, 2016
Merged

Ensure virtualenv activates #10618

merged 1 commit into from Jul 18, 2016

Commits on Apr 21, 2016

  1. Ensure virtualenv activates.

    There are two changes:
     * remove quoting which causes virtuaenv not activate
     * check virtualenv actually activated
    
    If the quoting added in the fix in #8394 (4ff8d3a) kicks in, it
    causes virtualenv to fail to activate.
    
    For the common case it is no op:
    ```python
    >>> from pipes import quote
    >>> print quote('common/case')
    common/case
    ```
    
    When the path actually needs quoting, this is what happens:
    
    ```python
    >>> print quote('test spaces')
    'test spaces'
    >>> print quote('windows\\path')
    'windows\\path'
    ```
    
    Note the embedded quotes.
    
    Virtualenv in activate_this.py uses __file__ to build the path that
    should be added to PATH:
    
    ```python
    >>> print os.getcwd()
    C:\software\git
    >>> print os.path.abspath(quote('windows\\path'))
    C:\software\git\'windows\path'
    >>>
    ```
    
    The constructed path is not valid. Adding it at the beginning of PATH
    has no effect. This issue affects any case when the call to `quote`
    kicks in.
    zwn committed Apr 21, 2016
You can’t perform that action at this time.