Conversation
37a4cad to
af574ac
Compare
Collaborator
|
CC @paveldikov for visiblity on the relocatable side |
paveldikov
reviewed
Nov 10, 2024
| // Bash has `$'\''`, but that's not universal enough. | ||
| // We can use implicit string concatenations, by putting the single quote into double | ||
| // quotes: | ||
| .replace('\'', r#"'"'"'"#) |
Contributor
There was a problem hiding this comment.
I think this is implemented somewhere in the codebase already... IIRC it was cited as a shlex.quote() analogue?
Collaborator
There was a problem hiding this comment.
Yea, it's in another crate
uv/crates/uv/src/commands/venv.rs
Lines 420 to 432 in 489d42a
60120d2 to
c58a662
Compare
Merged
charliermarsh
approved these changes
Nov 15, 2024
konstin
added a commit
that referenced
this pull request
Nov 15, 2024
Move the shlex-like quoting utils in the uv-shell crate, so we only write `r#"'"'"'"#` once. Split out from #8984
c58a662 to
ca9559d
Compare
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.
Escape an apostrophe in the venv path name.
Fixes #8947