Skip to content

Single quotes in value are not escaped properly #13

@wdegeus

Description

@wdegeus

We just ran into an issue where we had some HTML in an environment variable which was quoted, so for example:
aws ssm put-parameter --name /my/path/HTML_BODY --value "'Lorem Ipsum<br><br>'" --type String

Now eval $(aws-env) breaks:
AWS_ENV_PATH=/my/path aws-env-linux-amd64 export HTML_BODY=$''Lorem Ipsum<br><br>''

eval $(AWS_ENV_PATH=/my/path aws-env-linux-amd64)
-bash: syntax error near unexpected token '<'

If aws-env would escape these we would not have a problem:

$ export HTML_BODY=$'\'Lorem Ipsum<br><br>\''
$ echo $HTML_BODY 
'Lorem Ipsum<br><br>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions