Repository navigation
fix: double escape windows path in receipt - #2313
Merged
mistydemeo merged 7 commits intoMay 16, 2026
Merged
mistydemeo merged 7 commits into
mistydemeo merged 7 commits into
Conversation
eegli
marked this pull request as ready for review
March 2, 2026 15:38
Contributor
Author
|
@mistydemeo can we merge this? |
Contributor
|
Yes, sorry for the delay reviewing this. Just need to check something before merging! |
Contributor
Author
|
No worries, let me know if I can help out @mistydemeo |
Contributor
Author
|
Can we merge? |
Contributor
|
Yeah, sorry - just need to get the time to test this before merging. |
mistydemeo
approved these changes
May 16, 2026
mistydemeo
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks.
Sorry again for the delay. Started a new job recently and it's kept me very busy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up fix for #2227. Good news: We're halfway there with supporting Windows. However, on Git Bash/MSYS/MINGW environments, the
uv-receipt.jsonnow contains unescaped backslashes in theinstall_prefixfield, which is invalid JSON:{"install_prefix":"C:\Users\username\.local\bin",...}Root Cause
The
convert_path_for_receipt()function outputs escaped backslashes (\\), but these are later inserted via command substitution into a double-quoted sed command:RECEIPT=$(echo "$RECEIPT" | sed "s,AXO_INSTALL_PREFIX,$(convert_path_for_receipt "$_receipt_install_dir"),")Inside double quotes, the shell processes
\\as an escape sequence, which reduces each pair to a single backslash beforesedexecutes. This results in unescaped backslashes. With this change, we output 4 backslashes per original backslash, which get reduced to two again. Essentially:sed "s,AXO_INSTALL_PREFIX,C:\\\\Users\\\\test"-> Correct JSONRefactored it a little so the whole receipt path conversion logic is not spread all over the place