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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion 5.0/alpine3.20/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 5.0/alpine3.21/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 5.0/bookworm/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 5.1/alpine3.20/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 5.1/alpine3.21/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 5.1/bookworm/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 6.0/alpine3.20/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 6.0/alpine3.21/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion 6.0/bookworm/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ if [ -n "$isLikelyRedmine" ]; then
env="REDMINE_DB_${var^^}"
val="${!env}"
[ -n "$val" ] || continue
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

# (only add double quotes to every value *except* `adapter: xxx`)
fi
echo " $var: $val" >> config/database.yml
done
fi

Expand Down
Loading