Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 22, 2024
1 parent cab6b86 commit bc1ee2c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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" ]
}
Expand All @@ -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="$?"
Expand All @@ -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
File renamed without changes.
1 change: 1 addition & 0 deletions test/sourcing/teardown → test/sourcing/teardown_dir
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bc1ee2c

Please sign in to comment.