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: Add ability to escape special character when parse variables argument #355

Conversation

HuyPhanNguyen
Copy link
Contributor

@HuyPhanNguyen HuyPhanNguyen commented Jun 19, 2024

Support escape \: when parse in release deploy --variable "Test\:Prompt:Value1"

BEGIN_COMMIT_OVERRIDE
fix: Add ability to escape special character when parsing variables argument
END_COMMIT_OVERRIDE

@@ -181,7 +181,7 @@ func runbookRun(cmd *cobra.Command, f factory.Factory, flags *RunFlags) error {
return err
}

parsedVariables, err := executionscommon.ParseVariableStringArray(flags.Variables.Value)
parsedVariables, err := executionscommon.ParseVariableStringArray(flags.Variables.Value, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

if we just remove the enableEscape parameter, this will work for runbook runs too

Copy link
Contributor

@benPearce1 benPearce1 left a comment

Choose a reason for hiding this comment

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

Tested this locally, it works but the change needs to be on runbook runs too.

@HuyPhanNguyen HuyPhanNguyen merged commit 377ddb2 into main Jun 25, 2024
4 checks passed
@HuyPhanNguyen HuyPhanNguyen deleted the huy/2023/3/sc-82129-handle-special-character-in-variable-name branch June 25, 2024 06:57
@benPearce1 benPearce1 changed the title Add ability to escape special character when parse variables argument fix: Add ability to escape special character when parse variables argument Jun 26, 2024
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