Skip to content

Avoid migrating config directory when GH_CONFIG_DIR is set #3837

@mislav

Description

@mislav

Changeset #3671 added logic to migrate the config directory from an old location to a new one.

However, this leads to this side-effect:

# pretending like gh is not authenticated
GH_CONFIG_DIR=/tmp/nonexist gh auth status

What I had expected is that gh auth status will report that gh is unauthenticated, since there is nothing in /tmp/nonexist. However, what happens is that my existing config from ~/.config/gh/ gets moved to /tmp/nonexist.

I do not think that any migration should ever activate when GH_CONFIG_DIR was used. For example: some people use GH_CONFIG_DIR to switch between multiple accounts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions