Skip to content

Commit 596b14a

Browse files
Ensure the container deployment supports boolean values in yaml format. #9522
1 parent a46d4c2 commit 596b14a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/docker/entrypoint.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ EOF
6161
# This is a bit kludgy, but necessary as the container uses BusyBox/ash as
6262
# it's shell and not bash which would allow a much cleaner implementation
6363
for var in $(env | grep "^PGADMIN_CONFIG_" | cut -d "=" -f 1); do
64-
# shellcheck disable=SC2086
65-
# shellcheck disable=SC2046
66-
echo ${var#PGADMIN_CONFIG_} = $(eval "echo \$$var") >> "${CONFIG_DISTRO_FILE_PATH}"
64+
# Get the raw value
65+
val=$(eval "echo \"\$$var\"")
66+
# This normalization step is what makes 'true', 'True'
67+
case "$(echo "$val" | tr '[:upper:]' '[:lower:]')" in
68+
true) val="True" ;;
69+
false) val="False" ;;
70+
esac
71+
echo "${var#PGADMIN_CONFIG_} = $val" >> "${CONFIG_DISTRO_FILE_PATH}"
6772
done
6873
fi
6974

0 commit comments

Comments
 (0)