![marghettinicolas@hotmail.com](/assets/img/avatar_default.png)
![Jordan Harband](/assets/img/avatar_default.png)
2 changed files with 36 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||||||
|
#!/bin/sh |
||||||
|
|
||||||
|
cleanup () { |
||||||
|
unset -f die cleanup |
||||||
|
} |
||||||
|
die () { echo "$@" ; cleanup ; exit 1; } |
||||||
|
|
||||||
|
\. ../../../nvm.sh |
||||||
|
|
||||||
|
set -ex |
||||||
|
|
||||||
|
# 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 |
||||||
|
! nvm_download "https://raw.githubusercontent.com/nvm-sh/nvm/master/wrong_install.sh" >/dev/null || die "nvm_download should fail to download no existing file" |
||||||
|
|
||||||
|
cleanup |
@ -0,0 +1,18 @@ |
|||||||
|
#!/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 |
Loading…
Reference in new issue