wasmer-install icon indicating copy to clipboard operation
wasmer-install copied to clipboard

install.sh does not verify errors

Open rgl opened this issue 2 years ago • 0 comments

The script returned by https://get.wasmer.io (https://github.com/wasmerio/wasmer-install/blob/master/install.sh) does check for errors.

For example, while running it to install the latest 3.0.0 with my wrapper script, it failed to check for errors (e.g. error: File download failed with code 404), and ended up not installing the wasmer binary:

$ # NB I've omitted v from the WASMER_VERSION on purpose, to show the error.
vagrant@dm1:~/Projects/my-ubuntu-ansible-playbooks$ WASMER_VERSION=3.0.0 bash ./roles/wasmer/files/install-wasmer.sh 
Welcome to the Wasmer bash installer!

               ww
               wwwww
        ww     wwwwww  w
        wwwww      wwwwwwwww
ww      wwwwww  w     wwwwwww
wwwww      wwwwwwwwww   wwwww
wwwwww  w      wwwwwww  wwwww
wwwwwwwwwwwwww   wwwww  wwwww
wwwwwwwwwwwwwww  wwwww  wwwww
wwwwwwwwwwwwwww  wwwww  wwwww
wwwwwwwwwwwwwww  wwwww  wwwww
wwwwwwwwwwwwwww  wwwww   wwww
wwwwwwwwwwwwwww  wwwww
   wwwwwwwwwwww   wwww
       wwwwwwww
           wwww

downloading: wasmer-linux-amd64
Installing provided version: 3.0.0
error: File download failed with code 404
downloading: wapm-cli-linux-amd64
Latest release: 0.5.9
Downloading archive from https://github.com/wasmerio/wapm-cli/releases/download/v0.5.9/wapm-cli-linux-amd64.tar.gz
######################################################################## 100,0%
installing: /home/vagrant/.wasmer
vagrant@dm1:~/Projects/my-ubuntu-ansible-playbooks$ echo $?
0
vagrant@dm1:~/Projects/my-ubuntu-ansible-playbooks$ ll ~/.wasmer/bin/
total 22448
drwxr-xr-x 2 vagrant vagrant     4096 nov 16 07:22 ./
drwxrwxr-x 3 vagrant vagrant     4096 nov 23 11:34 ../
-rwxr-xr-x 1 vagrant vagrant 22974240 nov 16 07:22 wapm*
-rwxr-xr-x 1 vagrant vagrant       29 nov 16 07:22 wax*
vagrant@dm1:~/Projects/my-ubuntu-ansible-playbooks$ 


rgl avatar Nov 23 '22 11:11 rgl