Skip to content

config:get does not distinguish between unset and empty env vars #3450

@jasonkarns

Description

@jasonkarns

When attempting to purge env vars from environments (when an env var has been removed from the application and is no longer necessary), we've been using config:get to grab the current values (for posterity) before removal.

However, a frustrating part of the current config:get behavior is that it does not give any indication that an env var is completely unset (does not exist).

Ideally, config:get with an unset env variable would exit with a nonzero status code, so we could respond accordingly and know that the env var is completely removed from the environment. As it stands, there is no way to tell the difference between an env var that is set to the empty string, from one that is unset entirely.

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