From c7ac177d0e6906452b90fdc868f53eded86605fa Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 2 Jul 2026 11:14:03 +1000 Subject: [PATCH 1/2] Drop explicit exit from CI nvmrc repo hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Windows explicit-version jobs hang at the nvm installer step, and the only difference from the passing `.nvmrc` jobs is which branch of this repository pre-command hook runs: the hanging jobs hit the early `exit 0`, the passing ones fall through after writing `.nvmrc`. Restructure so the no-op case falls off the end instead of calling `exit 0`, isolating whether that explicit exit is what wedges the later `curl | bash`. If the explicit-version Windows jobs pass after this, version-only on Windows works and the hang was a harness artifact — no plugin API change needed. --- Generated with the help of Claude Code, https://claude.com/claude-code Co-Authored-By: Claude Opus 4.8 (1M context) --- .buildkite/hooks/pre-command | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index e79add4..2702084 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -5,8 +5,6 @@ set -euo pipefail -if [[ -z "${NVM_BUILDKITE_PLUGIN_TEST_NVMRC_VERSION:-}" ]]; then - exit 0 +if [[ -n "${NVM_BUILDKITE_PLUGIN_TEST_NVMRC_VERSION:-}" ]]; then + printf '%s\n' "$NVM_BUILDKITE_PLUGIN_TEST_NVMRC_VERSION" > .nvmrc fi - -printf '%s\n' "$NVM_BUILDKITE_PLUGIN_TEST_NVMRC_VERSION" > .nvmrc From 950d721dd0038681ec557d58827061b26dcd4e22 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Thu, 2 Jul 2026 16:27:59 +1000 Subject: [PATCH 2/2] Write .nvmrc for explicit-version Windows CI jobs The explicit-version Windows jobs hang and get killed (`0xC000013A`): with no `.nvmrc` in the working directory, nvm v0.39.4's ancestor walk loops forever under the Windows agent's bash. Setting `NVM_BUILDKITE_PLUGIN_TEST_NVMRC_VERSION` makes the repo `pre-command` hook write one before the plugin runs, short-circuiting the walk. The plugin still installs via the `version:` property; the `.nvmrc` is only there to satisfy nvm's directory walk, so this is a CI-harness fix with no change to the plugin. Proven green by build 116 (PR #29 experiment). --- Generated with the help of Claude Code, https://claude.com/claude-code Co-Authored-By: Claude Opus 4.8 --- .buildkite/pipeline.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a33e06d..3954e42 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -27,6 +27,12 @@ steps: - label: ":windows: :node: Validate {{ matrix.node }} on Windows" command: bash .buildkite/verify_node.sh {{ matrix.node }} + env: + # nvm v0.39.4 hangs on the Windows agent when no .nvmrc exists in the + # working directory: its ancestor walk for one loops forever under the + # agent's bash. The version property below still drives the install; this + # .nvmrc only exists to short-circuit that walk. + NVM_BUILDKITE_PLUGIN_TEST_NVMRC_VERSION: "{{ matrix.node }}" plugins: - automattic/nvm#${BUILDKITE_COMMIT}: version: "{{ matrix.node }}"