Skip to content

db drop and config delete exit 0 on a declined or non-terminal prompt; write help says an empty body is a no-op #23

Description

@xe-nvdk

Found while documenting arcli 26.09.1 against the binary (docs.basekick.net arcli section).

  1. arcli db drop NAME and arcli config delete NAME prompt [y/N], but a declined answer, or a non-terminal stdin (</dev/null, a pipe), prints Aborted. and exits 0 without doing anything (internal/commands/db.go confirmDestructive, internal/commands/config.go delete). Every other destructive command goes through confirmOrAbort and exits 1 with Error: aborted, refusing a non-TTY stdin unless --yes. Scripts cannot tell "dropped" from "aborted" by exit code. Proposed fix: route both through confirmOrAbort; the docs currently describe the actual behaviour and call it out as the exception.

  2. internal/commands/write.go (openWriteBody comment) says the server accepts an empty line-protocol body as a no-op; Arc returns 400 Empty request body, which arcli surfaces as an error with exit 1. Comment only; behaviour is fine.

Activity

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

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