[New-bugs-announce] [issue35667] activate for venv containing apostrophe doesn't work in powershell

Cheryl Sabella report at bugs.python.org
Sat Jan 5 16:34:29 EST 2019


New submission from Cheryl Sabella <cheryl.sabella at gmail.com>:

On Windows 10, when I try to activate a venv in powershell where the name contains an apostrophe, I get the following error ("don't" is the name of the venv):

PS N:\projects\cpython\don't\Scripts> .\activate.ps1
At N:\projects\cpython\don't\Scripts\Activate.ps1:42 char:28
+     function global:prompt {
+                            ~
Missing closing '}' in statement block or type definition.
At N:\projects\cpython\don't\Scripts\Activate.ps1:37 char:40
+ if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
+                                        ~
Missing closing '}' in statement block or type definition.
At N:\projects\cpython\don't\Scripts\Activate.ps1:43 char:61
+         Write-Host -NoNewline -ForegroundColor Green '(don't) '
+                                                             ~
Unexpected token ')' in expression or statement.
At N:\projects\cpython\don't\Scripts\Activate.ps1:43 char:63
+         Write-Host -NoNewline -ForegroundColor Green '(don't) '
+                                                               ~
The string is missing the terminator: '.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : MissingEndCurlyBrace

This works OK in Command Prompt.

----------
components: Library (Lib)
messages: 333075
nosy: cheryl.sabella
priority: normal
severity: normal
status: open
title: activate for venv containing apostrophe doesn't work in powershell
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35667>
_______________________________________


More information about the New-bugs-announce mailing list