Skip to content

fix: missing config errors should name the next command #631

Description

@margaretjgu

A missing or empty config writes the raw loader error and exits (src/cli.ts preAction). A new user or agent that runs elastic stack es ping with no ~/.elasticrc.yml should be told exactly what to run.

On missing file, empty current_context, or unresolved credentials:

  • Local/TTY: point at elastic config context add and elastic status
  • Non-TTY / CI: name ELASTIC_CLI_CONFIG_FILE and the required YAML keys
  • 401/403 from a configured context: point at elastic status --json and elastic config context edit

Do not build the #625 quickstart wizard here. This is the error path only.

Acceptance: wipe config, run elastic stack es ping, stderr names elastic config context add. Same message under --json as error.code plus error.message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions