mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-09 14:49:04 +00:00

committed by
Jordan Harband

parent
952d0067b3
commit
1e6b5ce039
@@ -4,6 +4,9 @@ set -ex
|
||||
|
||||
die () { echo "$@" ; exit 1; }
|
||||
|
||||
unset NVM_NODEJS_ORG_MIRROR
|
||||
unset NVM_IOJS_ORG_MIRROR
|
||||
|
||||
\. ../../../nvm.sh
|
||||
|
||||
! nvm_get_mirror || die 'unknown release type did not error'
|
||||
@@ -12,5 +15,17 @@ die () { echo "$@" ; exit 1; }
|
||||
! nvm_get_mirror node foo || die 'unknown release type did not error'
|
||||
! nvm_get_mirror iojs foo || die 'unknown release type did not error'
|
||||
|
||||
[ "$(nvm_get_mirror node std)" = "${NVM_NODEJS_ORG_MIRROR}" ] || die 'node std did not yield NVM_NODEJS_ORG_MIRROR'
|
||||
[ "$(nvm_get_mirror iojs std)" = "${NVM_IOJS_ORG_MIRROR}" ] || die 'node std did not yield NVM_NODEJS_ORG_MIRROR'
|
||||
[ -z "$NVM_NODEJS_ORG_MIRROR" ] || die "MIRROR environment variables should not be exported"
|
||||
[ -z "$NVM_IOJS_ORG_MIRROR" ] || die "MIRROR environment variables should not be exported"
|
||||
|
||||
[ "$(nvm_get_mirror node std)" = "https://nodejs.org/dist" ] || die "incorrect default node-std mirror"
|
||||
[ "$(nvm_get_mirror iojs std)" = "https://iojs.org/dist" ] || die "incorrect default iojs-std mirror"
|
||||
|
||||
NVM_NODEJS_ORG_MIRROR="test://domain"
|
||||
[ "$(nvm_get_mirror node std)" = "test://domain" ] || die "node-std mirror should respect NVM_NODEJS_ORG_MIRROR"
|
||||
unset NVM_NODEJS_ORG_MIRROR
|
||||
|
||||
NVM_IOJS_ORG_MIRROR="test://domain"
|
||||
[ "$(nvm_get_mirror iojs std)" = "test://domain" ] || die "iojs-std mirror should respect NVM_IOJS_ORG_MIRROR"
|
||||
unset NVM_IOJS_ORG_MIRROR
|
||||
|
||||
|
Reference in New Issue
Block a user