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

Merged
merged 1 commit into from
Jan 15, 2025

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

@yosifkit yosifkit merged commit 2ac7919 into docker-library:master Jan 15, 2025
11 checks passed
@yosifkit yosifkit deleted the double-quoted-adapter branch January 15, 2025 00:26
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Jan 15, 2025
Changes:

- docker-library/redmine@2ac7919: Merge pull request docker-library/redmine#356 from infosiftr/double-quoted-adapter
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