Skip to content

fix(update): don't report success when native update fails - #214

Merged
liruifengv merged 4 commits into
mainfrom
fix/native-update-pipefail
May 29, 2026
Merged

fix(update): don't report success when native update fails#214
liruifengv merged 4 commits into
mainfrom
fix/native-update-pipefail

Conversation

@liruifengv

@liruifengv liruifengv commented May 29, 2026

Copy link
Copy Markdown
Collaborator

The native auto-updater spawned bash -c "curl -fsSL … | bash". A pipeline's exit status is that of its last command, so when curl could not connect (e.g. a dead proxy) it produced no output, the trailing bash read empty stdin and exited 0, and the whole command looked successful — printing "Updated … Restart the CLI" while nothing had been installed.

Run the spawned shell with set -o pipefail so curl's non-zero status propagates. installUpdate() then rejects and runUpdatePreflight() warns and continues on the current version instead of claiming success.

Related Issue

Resolve #(issue_number)

Problem

What changed

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.

The native auto-updater spawned `bash -c "curl -fsSL … | bash"`. A
pipeline's exit status is that of its last command, so when curl could
not connect (e.g. a dead proxy) it produced no output, the trailing bash
read empty stdin and exited 0, and the whole command looked successful —
printing "Updated … Restart the CLI" while nothing had been installed.

Run the spawned shell with `set -o pipefail` so curl's non-zero status
propagates. installUpdate() then rejects and runUpdatePreflight() warns
and continues on the current version instead of claiming success.
@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f35c72c

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

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@f35c72c
npx https://pkg.pr.new/@moonshot-ai/kimi-code@f35c72c

commit: f35c72c

@liruifengv
liruifengv merged commit caaa6d8 into main May 29, 2026
6 checks passed
@liruifengv
liruifengv deleted the fix/native-update-pipefail branch May 29, 2026 11:45
@github-actions github-actions Bot mentioned this pull request May 29, 2026
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