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

Prevent asterisk expansion when asterisk is present in task definition value [semver:patch] #90

Merged
merged 2 commits into from
Jan 12, 2020

Conversation

lokst
Copy link
Contributor

@lokst lokst commented Jan 10, 2020

This is a fix for #89.
"set -o noglob" is used to prevent unwanted expansion of asterisks present in task definitions, by the shell.
.circleci/config.yml has also been updated so that the integration tests include a test for the fix.

Sample test: https://circleci.com/gh/CircleCI-Public/aws-ecs-orb/2620

@lokst lokst requested a review from iynere as a code owner January 10, 2020 04:59
@lokst lokst requested a review from a team January 10, 2020 05:02
Copy link

@FelicianoTech FelicianoTech left a comment

Choose a reason for hiding this comment

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

This looks like it works to me. Quick question though.

Is set -o noglob actually needed? Sometimes double quotes (added in line 661 for example) are enough. In Bash, adding single quotes to a line means to not interpret anything and treat the characters literally. Would using single quotes here be enough or do you think turning off globbing is necessary?

@KyleTryon
Copy link
Contributor

This looks like it works to me. Quick question though.

Is set -o noglob actually needed? Sometimes double quotes (added in line 661 for example) are enough. In Bash, adding single quotes to a line means to not interpret anything and treat the characters literally. Would using single quotes here be enough or do you think turning off globbing is necessary?

Agreeing with this. The <</>> replacement will still happen before the single quotes are interpreted, so I believe using single quotes would also solve this.

@lokst
Copy link
Contributor Author

lokst commented Jan 12, 2020

Thanks for the feedback @FelicianoTech @KyleTryon! I agree that quoting should be adequate; the turning off of globbing here was intended as a quick fix that can be revisited in favor of a better solution that ensures quotes are used in all places needing them.

@lokst lokst merged commit 833f26f into master Jan 12, 2020
@lokst lokst deleted the bugfix-asterisk-expansion branch January 12, 2020 23:25
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.

3 participants