mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-11-01 07:48:03 -06:00
Fix misleading error when _FILE secret is not readable.
This commit is contained in:
1 parent
50f78bf210
commit
b15f15960f
1 file changed
+4
@@ -23,6 +23,10 @@ function file_env() {
|
||||
local val="$def"
|
||||
if [ "${!var:-}" ]; then
|
||||
val="${!var}"
|
||||
elif [ "${!fileVar:-}" ] && [ ! -r "${!fileVar}" ]; then
|
||||
printf >&2 'error: %s is set to "%s" but the file does not exist or is not readable\n' \
|
||||
"$fileVar" "${!fileVar}"
|
||||
exit 1
|
||||
elif [ "${!fileVar:-}" ]; then
|
||||
val="$(< "${!fileVar}")"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user