Skip to content

Conversation

@mandre
Copy link
Contributor

@mandre mandre commented Mar 11, 2024

Use heredoc syntax to append the value of conf_overrides to the local.conf file. Compared to the previous solution using echo, this removes the need to shell escape your value.

Also remove the useless test, since the default value for inputs.conf_overrides is an empty string which results in a noop.

Fixes #19.

Use heredoc syntax to append the value of `conf_overrides` to the
`local.conf` file. Compared to the previous solution using `echo`, this
removes the need to shell escape your value.

Also remove the useless test, since the default value for
`inputs.conf_overrides` is an empty string which results in a noop.

Fixes gophercloud#19.
@pierreprinetti
Copy link
Member

LGTM 👍
The variable is replaced before Bash is even executed; this means that quotes in the variable are pasted as-is, and could terminate the quotes that start the argument to echo. Good catch @mandre

@EmilienM EmilienM merged commit 5fa6a4e into gophercloud:main Mar 12, 2024
@EmilienM
Copy link
Contributor

Merged from the beach

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.

unescaped conf_overrides can cause it to fail

3 participants