-
Notifications
You must be signed in to change notification settings - Fork 123
fix: installer receipt for windows with posix shell #51 #2227
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
base: main
Are you sure you want to change the base?
Conversation
|
Summoning @konstin |
|
|
| # Use cygpath to convert path, then escape backslashes for JSON | ||
| cygpath -w "$_path" | sed 's/\\/\\\\/g' | ||
| else | ||
| echo "$_path" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we know the path is likely to be wrong but we're not going to be able to convert it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will mirror the current behavior with the difference that the receipt is dumped to $LOCALAPPDATA - the correct location for Windows - but with POSIX paths.
Not being able to convert is an edge case that only happens if your environment is not based on Cygwin. cygpath is available on MSYS2, Git bash (which is based on MSYS2) and of course Cygwin itself. Those three probably cover almost all of the Windows-POSIX landscape.
It really is an edge case. If there are complaints, we could still introduce manual path conversion for when cygpath is not available (I don't really know when this could happen).
|
Snapshots are now up to date, took me a while to figure out |
Addresses astral-sh/uv#12686.
Notes
venvstd lib implementation: https://github.com/python/cpython/blob/9f8ec95bb079c86c82a397516ea5da0b2cc1033d/Lib/venv/scripts/common/activate#L40Supersedes astral-sh#51.