This repository has been archived on 2026-08-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
pi-web/.changeset/fix-fish-doctor-version-check.md
T
Gilbert 47c9b66819 fix: run doctor version checks under fish
The doctor "can find npm/pi" checks wrap the version command in a POSIX
subshell, `(cmd --version 2>&1 || true)`. Fish treats `( ... )` as command
substitution syntax and forbids it in command position, so every fish user saw
false-negative failures:

  fish: command substitutions not allowed in command position
  command -v npm && (npm --version 2>&1 || true)

Branch on the detected service shell and emit fish's `begin; ...; end`
grouping for fish, mirroring the existing fish-aware quoting in
serviceShellQuote. Bash and zsh keep the POSIX subshell.

Also guard the `main()` invocation with an ESM main-module check so the CLI
helpers can be imported by tests without side effects, and add a regression
test covering the bash, zsh, and fish command shapes.
2026-06-25 10:54:49 +08:00

427 B

@jmfederico/pi-web
@jmfederico/pi-web
patch

Fix pi-web doctor "can find npm/pi" checks on fish. The --version check wrapped the version command in a POSIX subshell (cmd --version 2>&1 || true), which fish parses as a command substitution in command position and rejects (command substitutions not allowed in command position), producing a false negative. Emit fish's begin; ...; end grouping when the service shell is fish.