File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
root/etc/s6-overlay/s6-rc.d/init-envfile Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ if find /run/s6/container_environment/FILE__* -maxdepth 1 > /dev/null 2>&1; then
66 SECRETFILE=$(cat "${FILENAME}")
77 if [[ -f ${SECRETFILE} ]]; then
88 FILESTRIP=${FILENAME//FILE__/}
9- if [[ ${SECRET_NO_SANITIZE,,} = "true" ]]; then
10- cat "${SECRETFILE}" >"${FILESTRIP}"
11- else
12- tr -d '\n' < "${SECRETFILE}" >"${FILESTRIP}"
9+ if [[ $(tail -n1 "${SECRETFILE}" | wc -l) = 1 ]]; then
10+ echo "[env-init] Your secret: ${FILENAME##*/}"
11+ echo " contains a trailing newline and may not work as expected"
1312 fi
13+ cat "${SECRETFILE}" >"${FILESTRIP}"
1414 echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
1515 else
1616 echo "[env-init] cannot find secret in ${FILENAME##*/}"
You can’t perform that action at this time.
0 commit comments