Skip to content

Diagnostic: print PWD before nvm install#31

Draft
mokagio wants to merge 3 commits into
mainfrom
mokagio/nvm-pwd-diagnostic
Draft

Diagnostic: print PWD before nvm install#31
mokagio wants to merge 3 commits into
mainfrom
mokagio/nvm-pwd-diagnostic

Conversation

@mokagio

@mokagio mokagio commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Diagnostic (not for merge)

Settles the one open question: does PR #24's normalization actually give nvm a forward-slash $PWD on the explicit-version Windows path? The explicit jobs hang in nvm_find_project_dir, whose ${path_%/*} loop never terminates on a pure-backslash PWD.

Prints $PWD, pwd, and ${PWD%/*} to stderr (so it flushes before the hang swallows block-buffered stdout) right before nvm install. Read on the hung v20.19.5 / v24.15.0 Windows jobs:

  • one-trim equals PWD → backslash no-op loop; normalization didn't stick → fix normalization.
  • one-trim shorter than PWD → forward-slash; normalization stuck → the hang is elsewhere.

🤖 Generated with Claude Code

Capture the PWD nvm walks on the explicit-version Windows path, to settle
whether PR #24's normalization actually yields a forward-slash $PWD that
nvm_find_project_dir sees. Printed to stderr so it flushes before the hang
swallows block-buffered stdout. `one-trim` equal to `PWD` proves the
backslash `${PWD%/*}` no-op loop; a shorter `one-trim` means normalization
stuck and the hang is elsewhere.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mokagio mokagio self-assigned this Jun 30, 2026
mokagio and others added 2 commits July 1, 2026 07:41
Build 118 showed buffered hook output never flushes while the job hangs —
even the stdout echo before the diag was swallowed. So don't hang: print
the PWD, the one-step `${PWD%/*}` trim, and a verdict on whether the trim
is a no-op (the backslash loop), then `return` before the real install.
The hook exits, Buildkite flushes the log, and the job ends instead of
hanging. Node won't install, so the verify command fails — expected; the
`[diag]` lines are the payload.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Build 119 froze before the v2 diag, so the hang is at normalization or
`source nvm.sh`, not `nvm install`. Bisect it: capture PWD before and
after normalization, then source nvm, with a buffer-filling padding flush
BEFORE each risky step so a later hang can't erase earlier readings. The
last `[diag] STAGE` line in the log pinpoints where it hangs, and the
`trim-noop` flags show whether `${PWD%/*}` is the backslash no-op.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Base automatically changed from mokagio/nvm-install-timeout to main July 2, 2026 08:15
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