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

Remove quoting from adapter: in database.yml #356

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

Conversation

tianon
Copy link
Member

@tianon tianon commented Jan 7, 2025

Fixes #353

This still needs testing -- ideally we'd add some automated tests, maybe even for all our supported database adapters, but that's not totally trivial.

(I have something locally for MySQL that I apparently was working on back in 2021, but it doesn't run successfully right now regardless of the issue this fixes, and I have no memory of writing it. 😂)

@tianon
Copy link
Member Author

tianon commented Jan 7, 2025

Confirmed now; redmine:latest fails, a build of this works.

echo " $var: \"$val\"" >> config/database.yml
if [ "$var" != 'adapter' ]; then
# https://github.com/docker-library/redmine/issues/353 🙃
val='"'"$val"'"'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
val='"'"$val"'"'
val="\"$val\""

No strong opinion either way, just curious why not double quotes with escapes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just that the highlight in my editor makes the former easier to see as "double quotes around a variable value" and \ is ugly -- very superficial, and I'm happy to change it if you prefer or think it's easier for others the other way. 👍

image

image

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