Skip to content

fix(cli): report non-interactive upgrade no-op - #2638

Open
map-c wants to merge 1 commit into
MoonshotAI:mainfrom
map-c:codex/fix-upgrade-non-tty-exit
Open

map-c wants to merge 1 commit into
MoonshotAI:mainfrom
map-c:codex/fix-upgrade-non-tty-exit

Conversation

@map-c

@map-c map-c commented Aug 5, 2026

Copy link
Copy Markdown

Related Issue

Resolve #2629

Problem

In non-interactive environments, kimi upgrade prints a manual update command without installing an available update, but exits with code 0. Automation therefore cannot distinguish the no-op from a successful upgrade.

What changed

  • Return exit code 1 when an available update is left uninstalled in a non-interactive environment.
  • Preserve exit code 0 for interactive manual-update guidance and already-up-to-date installations.
  • Add a macOS native-install regression test and document the behavior in both supported locales.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0c20abe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

[Bug] kimi upgrade exits 0 without upgrading in non-TTY environments — automation cannot detect the no-op

1 participant