You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
531 B
19 lines
531 B
4 years ago
|
#!/bin/sh
|
||
|
|
||
|
cleanup () {
|
||
|
unset -f die cleanup
|
||
|
}
|
||
|
die () { echo "$@" ; cleanup ; exit 1; }
|
||
|
|
||
|
NVM_ENV=testing \. ../../install.sh
|
||
|
|
||
|
# nvm_download install.sh
|
||
|
nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh" >/dev/null || die "nvm_download unable to download install.sh"
|
||
|
|
||
|
# nvm_download should fail to download wrong_install.sh
|
||
|
if nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/master/wrong_install.sh" &>/dev/null; then
|
||
|
die "nvm_download should fail to download no existing file"
|
||
|
fi
|
||
|
|
||
|
cleanup
|