fix(scripts/remote-install-update-mathlib.sh) read input from /dev/tty on Macs#940
fix(scripts/remote-install-update-mathlib.sh) read input from /dev/tty on Macs#940
Conversation
|
The script was already tested on mac. Looking at the |
|
The travis test executes the file locally. That works. But according to @PatrickMassot, the preferred way of using the script is by |
|
That's very odd. I'm using a Mac and I've never had that issue. |
|
Did you ever try the script without python being installed? |
|
I have not. Is this related to using |
|
Can you adapt the tests in - sh scripts/remote-install-update-mathlib.shtry: - curl https://raw.githubusercontent.com/leanprover-community/$TRAVIS_BRANCH/scripts/remote-install-update-mathlib.sh -sSf | sh |
|
Yes, the In this case the user is asked if they want to proceed, for this STDIN has to be set to /dev/tty. It doesn't make sense to test this on travis unless we're simulating user input (the y(es)). I don't know how to do that. In particular since that would require reading the output of the script, and waiting for the right moment to say yes. |
|
A reasonable alternative to this change is to stop asking the user for confirmation. We could just print an error message along the lines of
|
|
I think we can test the user input by piping |
|
Of course you
the |
|
I'm increasingly in favour of just removing those questions and printing a warning. It's cleaner and simpler. And I doubt anybody would miss the functionality. |
|
If you don't object, I modify the PR. |
|
I really prefer if the script install what it can. A lot of the users are not programmers and I'd like them to be able to use mathlib without having to look into how to install python. Can we use |
|
I wouldn't know how to. |
|
This was incorporated in #968 |
|
Thanks @jdsalchow! |
cf https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Installing.20mathlib