Skip to content

Commit b15f159

Browse files
authored
Fix misleading error when _FILE secret is not readable.
1 parent 50f78bf commit b15f159

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/docker/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ function file_env() {
2323
local val="$def"
2424
if [ "${!var:-}" ]; then
2525
val="${!var}"
26+
elif [ "${!fileVar:-}" ] && [ ! -r "${!fileVar}" ]; then
27+
printf >&2 'error: %s is set to "%s" but the file does not exist or is not readable\n' \
28+
"$fileVar" "${!fileVar}"
29+
exit 1
2630
elif [ "${!fileVar:-}" ]; then
2731
val="$(< "${!fileVar}")"
2832
fi

0 commit comments

Comments
 (0)