We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e85168 commit d1cc089Copy full SHA for d1cc089
docker-entrypoint.sh
@@ -27,7 +27,9 @@ file_env() {
27
# check to see if this file is being run or sourced from another script
28
_is_sourced() {
29
# https://unix.stackexchange.com/a/215279
30
- [ "${FUNCNAME[${#FUNCNAME[@]} - 1]}" == 'source' ]
+ [ "${#FUNCNAME[@]}" -ge 2 ] \
31
+ && [ "${FUNCNAME[0]}" = '_is_sourced' ] \
32
+ && [ "${FUNCNAME[1]}" = 'source' ]
33
}
34
35
# used to create initial posgres directories and if run as root, ensure ownership to the "postgres" user
0 commit comments