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 shell quoting #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix shell quoting #17

wants to merge 1 commit into from

Conversation

h3xx
Copy link

@h3xx h3xx commented Oct 3, 2022

Note: the export builtin can be tricked with the syntax: export FOO=$BAR -- if $BAR is set to the string value OTHERVAL=foo, it'll end up setting and exporting two variables. This PR fixes that possibility by quoting: export FOO="$BAR".

(Note: export "FOO=$BAR" would be a correct fix too)

Also quote RHS inside [[ = ]], which fixes unintended matching when the
RHS is a glob.
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.

1 participant