Skip to content

Commit

Permalink
maybe revert
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 27, 2024
1 parent 02f5165 commit e13f593
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Empty file modified test/installation_iojs/install from source
100755 → 100644
Empty file.
13 changes: 5 additions & 8 deletions test/installation_node/install from binary with binary flag set
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,16 @@ if [ "${OUTPUT#*"${EXPECTED_OUTPUT}"}" = "${OUTPUT}" ]; then
die "No source binary flag is active and should have returned >${EXPECTED_OUTPUT}<. Instead it returned >${OUTPUT}<"
fi

local ARGS
ARGS=''
nvm_install_source() {
ARGS="$@"
echo 'source installed'
return 0
>&2 echo 'source intentionally failed'
return 1
}

# binary fails, falls back to source if -b is not set
OUTPUT="$(nvm install 9.0.0 2>&1)"
EXPECTED_OUTPUT="binary failed
source installed"
Detected that you have 2 CPU core(s)
Number of CPU core(s) less than or equal to 2, running in single-threaded mode
source intentionally failed"

[ "${EXPECTED_OUTPUT}" = "${OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"

[ "${ARGS}" = "-b 9.0.0" ] || die "expected >-b 9.0.0<, got >${ARGS}<"
Empty file.

0 comments on commit e13f593

Please sign in to comment.