Skip to content

entrypoint tests if POSTGRES_PASSWORD is empty instead of testing if it is unset #683

@SpoonMeiser

Description

@SpoonMeiser

The behaviour was changed in commit 42ce743

The comments introduced here say:

# error if both POSTGRES_PASSWORD is unset and POSTGRES_HOST_AUTH_METHOD is not 'trust'

But the actual test against POSTGRES_PASSWORD is [ -z "$POSTGRES_PASSWORD" ] which is different from what the comment suggests.

The correct test to match the comment would be: [ ! -v POSTGRES_PASSWORD ].

The current implementation prevents the password explicitly being set to the empty string, and issues a misleading error when it is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions