Skip to content

fix(cli): require --yes flag for non-TTY atomic-agent update - #213

Open
yablokolabs wants to merge 1 commit into
AtomicBot-ai:mainfrom
yablokolabs:fix/update-yes-flag
Open

fix(cli): require --yes flag for non-TTY atomic-agent update#213
yablokolabs wants to merge 1 commit into
AtomicBot-ai:mainfrom
yablokolabs:fix/update-yes-flag

Conversation

@yablokolabs

Copy link
Copy Markdown
Contributor

Summary

Follow-up to PR #206 (review comment). A non-TTY update (cron, CI, piped output) replaced the binary with no confirmation — the confirm prompt was gated on isTTY() alone, and no --yes flag existed.

This adds --yes / -y; non-TTY invocations without it now refuse with exit 1 and a clear message. TTY invocations continue to prompt as before. --check is unaffected (it never installs).

Changes

  • src/cli/update-command.ts--yes/-y flag in parseArgs, non-TTY guard before both run() callsites, --yes documented in help text

Test coverage

7 new tests (21 total, up from 14):

  • Non-TTY refuses without --yes (latest path and --version path)
  • --yes auto-confirms in non-TTY
  • -y short flag works
  • --yes skips prompt in TTY
  • --version with/without --yes in TTY

Verification

  • npm run lint clean
  • 107/107 CLI tests pass

PR AtomicBot-ai#206 review: a non-TTY `update` (cron, CI, piped output) replaced the
binary with no confirmation because the prompt was gated on isTTY()
alone. This adds a --yes / -y flag; non-TTY invocations without it now
refuse with exit 1 and a clear message. TTY invocations continue to
prompt as before. --check is unaffected (it never installs).

7 new tests covering: non-TTY refusal (latest path), non-TTY refusal
(--version path), --yes auto-confirm (non-TTY), -y short flag,
--yes skips prompt in TTY, --version with/without --yes in TTY.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant