When the Windows username contains a space (e.g. Sha Roze), the temp path used to invoke the downloaded .ps1 installer script is not quoted. PowerShell tokenizes the path on the space, treating the first segment as a command name, causing the update to fail entirely.
I encountered this bug when trying to update uv using its self update command.
Steps to Reproduce
- Have a Windows user account whose name contains a space (e.g.
C:\Users\Sha Roze)
- Install
uv via the standalone installer
- Run
uv self update
Error Output
C:\Users\Sha : The term 'C:\Users\Sha' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Sha Roze\AppData\Local\Temp\.tmpGjtrqF\installer.ps1
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Sha:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Environment
When the Windows username contains a space (e.g.
Sha Roze), the temp path used to invoke the downloaded.ps1installer script is not quoted. PowerShell tokenizes the path on the space, treating the first segment as a command name, causing the update to fail entirely.I encountered this bug when trying to update uv using its self update command.
Steps to Reproduce
C:\Users\Sha Roze)uvvia the standalone installeruv self updateError Output
Environment
OS: Windows
Shell: PowerShell
uv issue: uv cannot self update on windows with a space in the user name astral-sh/uv#7988