Aller au contenu
OpenToAll
Retour aux issues
gougoujiang/buildmax #137

doctor reports the Portal test dependencies as ready on a machine with no npm

Débutant good first issuearea: contributor-experience
1 ★ Poids du clone léger Mise à jour

Description

## What happens On a machine with Go but no Node, `./make doctor` prints all three of these: ``` [INFO] npm: not installed (needed for gui, Portal, Desktop, and the Markdown lint in ./make check docs) [OK] Portal test deps: installed (needed by ./make e2e) [OK] Playwright browsers: /Users/you/Library/Caches/ms-playwright ``` Reproduce it without uninstalling anything: ```bash env PATH="/usr/bin:/bin:$(dirname "$(which go)")" ./make doctor ``` Every line is true on its own. `optionalPortalBrowserTests` in `cmd/mk/doctor.go` checks the filesystem — `portal/node_modules/@playwright/test` and the Playwright cache — and neither depends on npm being on PATH. But read together they say the browser suite is ready on a machine that cannot run `npm ci`, `npm run`, or anything else the suite needs. doctor states facts without relating them, and this is the one place where two of those facts contradict each other in a way a reader will act on. ## What would help Make the two rows depend on the tool that would use them. A `[WARN]` naming the missing prerequisite, or a note that the check is moot without npm, both work — the point is that a contributor reading the block cannot come away believing `./make e2e local` will run. Keep them out of `doctor`'s failure count either way: they are optional paths, and doctor's exit code is about whether the core toolchain works. ## Verify ```bash ./make doctor # on your normal PATH env PATH="/usr/bin:/bin:$(dirname "$(which go)")" ./make doctor ./make test ./cmd/mk ``` `cmd/mk/doctor.go` is the only file involved. There is no test over doctor's output today, so adding one for this case would be welcome but is not required.

Issues similaires

Tout voir
Ouvre sur GitHub