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

curl https://get.wasmer.io -sSfL | sh script does not wait for user input while reinstalling

Open sanathusk opened this issue 2 years ago • 2 comments

My wasmer installation failed when during the first time , when i rerun the command curl https://get.wasmer.io -sSfL | sh , The following message: Wasmer already installed in /home/san/.wasmer with version: 2.2.1 warning: wasmer is already installed in the latest version: 2.2.1 Do you want to force the installation?san@san-pc:

However , It does not wait for me to provide an input (yes/no). If the clone the wasmer-install repo & run the install.sh script , the script waits for my input at above mentioned point and installation proceeds when i provide 'y' as an input

sanathusk avatar Mar 17 '22 04:03 sanathusk

stdin is fully consumed by sh, so it can't also be provided by a tty.

rustup solves this issue by downloading the architecture-specific script to a temp directory (from mktemp -d) and then executing it (like "$script" "$@" < /dev/tty).

starthal avatar Oct 06 '22 13:10 starthal

@starthal the way that rustup is doing it is a great way of solving it!

Would you like to contribute with a PR? (PS: thanks a lot for the PR fixing the Windows install!)

syrusakbary avatar Oct 11 '22 15:10 syrusakbary