Skip to content
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

Wrap env description in quotes #278

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

nkaretnikov
Copy link
Contributor

Fixes #274.

@nkaretnikov nkaretnikov marked this pull request as ready for review August 28, 2023 09:35
@nkaretnikov
Copy link
Contributor Author

The error comes from the YAML parser. I wrap the description value in quotes before passing it further.

This avoids YAML syntax errors like this (this example won't work in the old UI either because it's invalid syntax):

description: this is invalid : because it has two colons and no quotes

Verified that links and colons work now.

New UI:
Screen Shot 2023-08-28 at 11 24 56

Old UI (same env):
Screen Shot 2023-08-28 at 11 25 20

@nkaretnikov
Copy link
Contributor Author

Note: this will still fail to parse a description containing a single quote (because it will be parsed as the terminating quote, leading to a syntax error). I've decided not to address this as part of this PR.

@trallard trallard added needs: review 👀 area: user experience 👩🏻‍💻 Items impacting the end-user experience labels Aug 29, 2023
@trallard trallard added this to the 🚀 JATIC - Q1 milestone Aug 29, 2023
@pierrotsmnrd pierrotsmnrd self-requested a review August 30, 2023 12:45
Copy link
Contributor

@pierrotsmnrd pierrotsmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Tested locally, works.

@pierrotsmnrd pierrotsmnrd merged commit f23c0e9 into conda-incubator:main Aug 30, 2023
1 check passed
@kcpevey
Copy link
Contributor

kcpevey commented Aug 31, 2023

Note: this will still fail to parse a description containing a single quote (because it will be parsed as the terminating quote, leading to a syntax error). I've decided not to address this as part of this PR.

@nkaretnikov That works for me. Can you open up an issue to track?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Colons are invalid characters in the env description
4 participants