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 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 }}"