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

fix: handle quotes in --tla-str and --ext-str in "tk eval" #1237

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

rudo-thomas
Copy link
Contributor

Problem: If a string with a quote was passed to tk eval's --tla-str or --ext-str, things would break in an unexpected fashion.

Fix: Properly JSON-quote any given string.

Problem: If a string with a quote was passes to tk eval's --tla-str or
--ext-str, things would break in an unexpected fashion.

Fix: Properly JSON-quote any given string.
@rudo-thomas rudo-thomas requested a review from a team as a code owner November 21, 2024 18:15
@zerok
Copy link
Contributor

zerok commented Nov 22, 2024

Thank you 🙂 Could you please also add a test for this if possible? 🙂

@zerok zerok changed the title fix: Handle quotes in --tla-str and --ext-str in "tk eval". fix: handle quotes in --tla-str and --ext-str in "tk eval". Nov 22, 2024
@rudo-thomas
Copy link
Contributor Author

Thank you 🙂 Could you please also add a test for this if possible? 🙂

Sure. See 69e25fa

@zerok zerok changed the title fix: handle quotes in --tla-str and --ext-str in "tk eval". fix: handle quotes in --tla-str and --ext-str in "tk eval" Nov 22, 2024
rudo-thomas added a commit to rudo-thomas/tanka that referenced this pull request Nov 22, 2024
Convert the flag values to `import/importstr @"verbatim ""quoted"" string"`,
pretty much like go-jsonnet does it.

Implements grafana#848

Depends on grafana#1237 for the tests.
@zerok zerok added this pull request to the merge queue Nov 22, 2024
Merged via the queue into grafana:main with commit 7cba21d Nov 22, 2024
10 of 11 checks passed
@rudo-thomas rudo-thomas deleted the fix-tla-str-quoting branch November 22, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants