diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1963ffc41..00ac65ef88 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,6 +65,7 @@ jobs: skip-ls-check: true shell-command: echo installed - run: npm ls urchin + - run: npx which urchin - run: env - run: make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }} diff --git a/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded b/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded index fc99a0d1c8..9741195bb3 100755 --- a/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded +++ b/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded @@ -12,9 +12,7 @@ NVM_DIR_CACHED="${NVM_DIR}" nvm unload || die 'unloading returned nonzero exit code' NVM_DIR="${NVM_DIR_CACHED}" -echo '0.10.1' > ../../alias/default || die 'creation of default alias failed' - -which node && NVM_DIR="/home/runner/mynvm" nvm deactivate && which node && die 'node was found in PATH after unloading nvm' +echo '0.10.1' > "${NVM_DIR}/alias/default" || die 'creation of default alias failed' # Now to begin the real test \. ../../nvm.sh || die 'sourcing returned nonzero exit code' diff --git a/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it b/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it index 2cd095ca5d..e40e5c1c88 100755 --- a/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it +++ b/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it @@ -1,6 +1,6 @@ #!/bin/sh -die () { echo "$@" ; exit 1; } +die () { rm .nvmrc ; echo "$*" ; exit 1; } supports_source_options () { [ "_$(echo 'echo $1' | . /dev/stdin yes)" = "_yes" ] } @@ -10,7 +10,7 @@ if ! supports_source_options; then exit 0; fi -echo '0.10.2' > ../../.nvmrc || die 'creation of .nvmrc failed' +echo '0.10.2' > .nvmrc || die 'creation of .nvmrc failed' \. ../../nvm.sh --install EXIT_CODE="$?" @@ -25,3 +25,5 @@ nvm_version 0.10.2 >/dev/null 2>&1 || die "v0.10.2 not installed: \n$(nvm_ls)" NVM_LS_CURRENT="$(nvm ls current | \grep -o v0.10.2)" [ "_$NVM_LS_CURRENT" = '_v0.10.2' ] || die "'nvm ls current' did not return '-> v0.10.2', got >${NVM_LS_CURRENT}<\n$(nvm_ls)" + +rm .nvmrc diff --git a/test/sourcing/setup b/test/sourcing/setup_dir similarity index 100% rename from test/sourcing/setup rename to test/sourcing/setup_dir diff --git a/test/sourcing/teardown b/test/sourcing/teardown_dir similarity index 76% rename from test/sourcing/teardown rename to test/sourcing/teardown_dir index 9bb52b0a6c..fb6ba3b927 100755 --- a/test/sourcing/teardown +++ b/test/sourcing/teardown_dir @@ -4,4 +4,5 @@ rm -rf ../../alias rm -rf ../../v0.10.1 rm -rf ../../v0.10.2 rm -rf ../../v0.10.3 +rm -rf ../../versions/node/v4.1.0 rm -f ../../.nvmrc