wasmer-install
wasmer-install copied to clipboard
curl https://get.wasmer.io -sSfL | sh script does not wait for user input while reinstalling
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
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 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!)