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

Validate quote balance in installFlags #556

Merged
merged 2 commits into from
Sep 12, 2023
Merged

Conversation

kke
Copy link
Contributor

@kke kke commented Sep 11, 2023

Fixes #555

Checks if quotes are balanced in host.InstallFlags and spits out a validation error if not.

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
@kke kke added the enhancement New feature or request label Sep 11, 2023
@kke kke changed the title Validate balanced quotes in installFlags Validate quote balance in installFlags Sep 11, 2023
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Copy link

@artem-zinnatullin artem-zinnatullin left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

require.NoError(t, h.Validate())

h.InstallFlags = []string{`--foo="`, "--bar"}
require.ErrorContains(t, h.Validate(), "unbalanced quotes")

Choose a reason for hiding this comment

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

👍

@kke kke merged commit 4f8975d into main Sep 12, 2023
18 checks passed
@kke kke deleted the validate-installflags-quotes branch September 12, 2023 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing error message for invalid installFlags
2 participants