This is an automated email from the ASF dual-hosted git repository. georgew5656 pushed a commit to branch fixUnderscoredProperties in repository https://gitbox.apache.org/repos/asf/druid.git
commit cba795e10f57166657237b924c21fb65383aa61f Author: George Wu <[email protected]> AuthorDate: Fri Feb 16 10:30:37 2024 -0500 Fix parsing of env variables when properties have underscores --- distribution/docker/druid.sh | 2 +- distribution/docker/peon.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/docker/druid.sh b/distribution/docker/druid.sh index 1bc2f4f071a..f60376e454d 100755 --- a/distribution/docker/druid.sh +++ b/distribution/docker/druid.sh @@ -148,7 +148,7 @@ env | grep ^druid_ | while read evar; do # Can't use IFS='=' to parse since var might have = in it (e.g. password) val=$(echo "$evar" | sed -e 's?[^=]*=??') - var=$(echo "$evar" | sed -e 's?^\([^=]*\)=.*?\1?g' -e 's?_?.?g') + var=$(echo "$evar" | sed -e 's?^\([^=]*\)=.*?\1?g' -e 's?__?$UNDERSCORE?g' -e 's?_?.?g' -e 's?$UNDERSCORE?_?g') setKey $SERVICE "$var" "$val" done diff --git a/distribution/docker/peon.sh b/distribution/docker/peon.sh index b5ec89ea8d4..bd9bff89fce 100755 --- a/distribution/docker/peon.sh +++ b/distribution/docker/peon.sh @@ -107,7 +107,7 @@ env | grep ^druid_ | while read evar; do # Can't use IFS='=' to parse since var might have = in it (e.g. password) val=$(echo "$evar" | sed -e 's?[^=]*=??') - var=$(echo "$evar" | sed -e 's?^\([^=]*\)=.*?\1?g' -e 's?_?.?g') + var=$(echo "$evar" | sed -e 's?^\([^=]*\)=.*?\1?g' -e 's?__?$UNDERSCORE?g' -e 's?_?.?g' -e 's?$UNDERSCORE?_?g') setKey $SERVICE "$var" "$val" done --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
