Skip to content

Stage the update's download under a name node --check accepts - #1

Merged
lperrin merged 2 commits into
mainfrom
fix-self-update-staging
Nov 2, 2026
Merged

lperrin merged 2 commits into
mainfrom
fix-self-update-staging

Conversation

@lperrin

@lperrin lperrin commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Why

wt update (and the daily background update) checks its download with node --check before renaming it over the installed script. It staged the download as wt.<pid>.tmp, and Node refuses an extension it doesn't know (ERR_UNKNOWN_FILE_EXTENSION), so every update failed with "the download doesn't run". A 0.1.0 install can't update itself; it needs the installer run again.

What

  • The staging file is .wt-<pid>-update, next to the script, with no extension.
  • The smoke test copies dist/wt under that name and runs node --check on it.
  • Version 0.1.1.

Verified with a copy built as 0.0.1: wt update downloaded 0.1.0 over it, the staging file was gone, and a second run reported it current.

🤖 Generated with Claude Code

lperrin and others added 2 commits November 2, 2026 12:04
The updater checks the file it downloaded with `node --check` before moving
it over itself, and staged it as `wt.<pid>.tmp`: Node refuses an extension
it doesn't know, so every update failed. It's `.wt-<pid>-update` now, with
no extension, and the smoke test runs `node --check` under that name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… README

CI checks a pull request out detached, so the main worktree has no branch
name and `--complete` printed nothing: the smoke test now makes a small repo
with a branch and a second worktree, and also checks that a query naming one
worktree prints its path.

The README keeps the one-line installer as the way in; the manual and npm
paths are gone from it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lperrin
lperrin merged commit 02033a7 into main Nov 2, 2026
7 checks passed
@lperrin
lperrin deleted the fix-self-update-staging branch November 2, 2026 11:07
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