Skip to content

Auto-init guard ignores global ~/.hx, breaking the shipped hx entrypoint #270

Description

@half-ogre

Bug

Commands like hx env pull, hx env run, hx pull, and hx deploy
fail with auto-init failed: Error writing file: .hx when config lives
only in ~/.hx and there's no local ./.hx. This breaks the shipped
cmd/entrypoint/hyphen-entrypoint.sh, which writes only the global
file.

Analysis

Before 0.28.0 there was no pre-run config check. Guarded commands
called config.RestoreConfigFromFile, which merges global + local, and
a complete ~/.hx was sufficient.

0.28.0 added autoinit.Ensure (PR #267) as a PersistentPreRunE
hook. It calls HasCompleteLocalAppConfigconfig.RestoreLocalConfig
— local-only, no merge. So the guard now rejects setups the command
itself would still accept; with --yes, runInitApp then tries to
create ./.hx in CWD and fails when the running user doesn't own CWD
(e.g. Fargate task as non-root in /app).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions