Skip to content

fix(cli): find npm on windows when updating - #2

Merged
Fenish merged 1 commit into
mainfrom
fix/windows-update
Oct 11, 2026
Merged

Fenish merged 1 commit into
mainfrom
fix/windows-update

Conversation

@Fenish

@Fenish Fenish commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Self-update never worked on Windows.

Cause: the update ran npm by its bare name. Rust only finds .exe files that way on Windows, and npm there is npm.cmd (the extensionless npm next to it is a shell script Windows can't run). So the first check failed with "program not found", and the failure was remembered for 24 hours, so later launches showed nothing.

Fix:

  • Look the package manager up by the files Windows can run (npm.cmd, pnpm.exe/pnpm.cmd, bun.exe), in the install folder first, then on PATH.
  • While a failed version waits to be retried, the dashboard still says it's out and shows the install command, instead of staying silent.

Test: a temp folder laid out like Windows (npm script in the npm prefix, npm + npm.cmd in the Node folder) resolves to npm.cmd; reverting the fix fails the test. Workspace: 271 tests pass, fmt and clippy clean.

Releases as a patch (fix). Copies already on 0.4.0 or earlier can't update themselves on Windows; run npm i -g skillpouch once.

Updating ran the package manager by its bare name, which Windows only finds as an .exe. npm is npm.cmd there, so every update failed with 'program not found', and the failure was then kept quiet for a day. The package manager is now looked up by the names Windows can run, next to SkillPouch and on PATH, and the dashboard keeps saying a release is out, with the command to install it, while a failed version waits to be tried again.
@Fenish
Fenish merged commit 8f5c359 into main Oct 11, 2026
5 checks passed
@Fenish
Fenish deleted the fix/windows-update branch October 11, 2026 08:44
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