-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
explicitly connect /dev/tty. Allows running via sh #5500
base: master
Are you sure you want to change the base?
Conversation
Do we know if anyone is using the install script in an automated way (e.g. |
This is a good question. There is the possibility to extend this patch to conditionally connect |
4a1b6d6
to
6dd85c2
Compare
I found a way to conditionally connect Then, the script can be invoked as:
This is backwards-compatible for automated scripts, as explicitly connecting to |
6dd85c2
to
45f11f0
Compare
|
6799e66
to
8e65706
Compare
This PR is queued on #6313. There will be a couple of things to do to make it correct afterwards too, i'll handle it.
and without any extra parameters:
|
8e65706
to
7597a5b
Compare
It should be super simple and quick to install opam on various Linux distros and macOS. Some of the targeted OSes might not have the bash command needed for the invocation
Instead,
install.sh
should be invokable viaHowever, a problem with that is that, when piping the downloaded script into
sh
,/dev/tty
is not connected, so we cannot read from stdin.This patch remedies this issue by changing
install.sh
to explicitlyread
from/dev/tty
. It also factors out the prompting into a functionprompt
.Note: if any of the other commands called by
install.sh
require user interaction via stdin, they should also be explicitly connected to/dev/tty
. I have not checked whether they do!