Avoid quotes in suggested .env file for IDEs (Cherry-pick of #20144) #20146
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.
This fixes #20127 by avoiding double quotes in the
.env
file generated by the code snippet in the IDE set-up docs.Double quotes aren't supported by the
scie-pants
.env
loader, and a line containing them was previously silently ignored (plus all lines after), but with scie-pants 0.11.0, will be an error. See pantsbuild/scie-pants#307 and pantsbuild/scie-pants#319.The new suggestion has no quotes at all, because there's no other way to have a line that includes a substitution. To handle source roots with spaces in their paths, this has to also manually escape them. Supporting double quotes is effectively a new feature of
scie-pants
launcher (via scie jump a-scie/jump#166 viadotenvy
allan2/dotenvy#11), but for now we can at least stop suggesting incorrect things.For instance, with source roots
a b/c
anddef
, this generates: