Repository navigation
fix: stop blaming PATH when the Very Good CLI version cannot be read - #176
Conversation
|
Heads up — I'm auto-updating this PR by merging the latest |
|
I tried to auto-update this PR with |
35b51d0 to
78c0e51
Compare
|
Heads up — I'm auto-updating this PR by merging the latest |
1 similar comment
|
Heads up — I'm auto-updating this PR by merging the latest |
|
I tried to auto-update this PR with |
d32b0e2 to
672ab7d
Compare
672ab7d to
9e07451
Compare
Closes #171 Two bugs made the SessionStart hook blame PATH for a Dart SDK upgrade. `very_good --version` was read with `head -1`. When the shim's snapshot is stale it falls back to `dart pub global run`, which prints its resolution chatter to stdout ahead of the version, so the first line held no version and a working CLI read as unverifiable. Match past the first line, anchored so a version-shaped fragment of a path in that chatter cannot win: a stub whose chatter names /tmp/vgv-1.2.3/pkg reads as `outdated:1.2.3` unanchored. `unverifiable` then covered both an absent dart and an unreadable version, and all three hooks reported it as a PATH problem. Split it on `command -v dart`: `dart_missing` keeps the PATH advice, no longer naming one shell's startup file, and `unverifiable` points at the rebuild and the `/mcp` reconnect a server started before the upgrade needs. The stubs printed "very_good 1.5.0"; the real CLI prints a bare "1.5.0", so they now print that. jq reaches the hooks through a symlinked directory, because its own directory holds dart on a Homebrew machine and the dart_missing cases then ran the wrong branch; each suite refuses to run if dart resolves on its base PATH.
9e07451 to
7f27e7f
Compare
Description
Closes #171
Two bugs made the SessionStart hook blame
PATHfor a Dart SDK upgrade.very_good --versionwas read withhead -1. When the shim's snapshot is stale it falls back todart pub global run, which prints its resolution chatter to stdout ahead of the version, so a working CLI read as unverifiable. The match now looks past the first line, anchored so a version-shaped fragment of a path in that chatter cannot win instead.unverifiablethen covered both an absentdartand an unreadable version, and all three hooks reported it as aPATHproblem. It now splits oncommand -v dart:dart_missingkeeps the PATH advice without naming one shell's startup file, andunverifiablepoints at the rebuild and the/mcpreconnect a server started before the upgrade needs.Type of Change
feat)fix)refactor)docs)ci)chore)🤖 Generated with Claude Code