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: echo environment variable containing special char #516

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

LordKa0S
Copy link
Contributor

@LordKa0S LordKa0S commented Oct 23, 2024

Summary

The PT_install_flags variable is known to contain special characters, which may not be deterministically resolved by the shell unless escaped. It is recommended to quote such variables when using in conjunction with echo.

The unquoted variable is essentially one long character class, [...], and it will match any single-letter filename in the current directory whose name occurs in within the brackets.

source

Additional Context

Related Issues (if any)

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.

Changes include test coverage?

  • Yes
  • Not needed

Have you updated the documentation?

  • Yes, I've updated the appropriate docs
  • Not needed

@LordKa0S LordKa0S requested review from a team as code owners October 23, 2024 03:47
@CLAassistant
Copy link

CLAassistant commented Oct 23, 2024

CLA assistant check
All committers have signed the CLA.

@ragingra
Copy link
Member

@LordKa0S Thanks for making this change. Looks like something that was overlooked. Could you sign the CLA please and I'll get this merged.

@LordKa0S
Copy link
Contributor Author

@ragingra I've been told that set -o noglob and set -f at the start of the script would have the same effect as (and instead of) quoting. I'll defer to you the choice of implementation that makes the most sense from a project overall perspective.

@ragingra ragingra merged commit c935299 into puppetlabs:main Oct 23, 2024
70 checks passed
@LordKa0S
Copy link
Contributor Author

@ragingra when's the next release?

@LordKa0S LordKa0S deleted the envfix branch October 23, 2024 18:50
@ragingra
Copy link
Member

@LordKa0S Hoping to get patch release out tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants