Git-for-Windows opam init
menu repeatedly asks the user to do the same
#5835
Labels
opam init
menu repeatedly asks the user to do the same
#5835
When run on a vanilla Windows system (without Git for Windows, etc.)
opam init
presents the user with:So, I'm a reasonably good user, and I do at least read the first bit and so choose option 3 and get told:
I run
winget install Git.Git
which scrolls that message up a bit. I'm not that good a user, so of course I forget to restart my shell and runopam init
to be presented with the same menu. I scratch my ever-balding head at getting the same menu, and select option 3 to go and check whether winget actually worked. This time I see the note and remember that I forgot to restart the terminal. So I do that, and runopam init
again:The default option selected goes against the recommendation, despite the fact that option 2 is actually Git-for-Windows.
We're asking the user to do something and then, when they've done it, we're still asking them to do it... I don't think we should ship with
while true do () done
inopam init
🙂There are three changes which ought to be made:
git
is found in PATH (and it's not from Scoop, etc. - i.e.bash
is not also there), and it's demonstrably Git-for-Windows,opam
should just say[NOTE] Found Git-for-Windows <version> in PATH at <path> - good!
and carry on.git
is found, the default option should be "3" so that the enter-hitting, non-message reading user gets back to their prompt and is forced to read whatopam init
said...git
in PATH is "bad" (i.e. containsbash.exe
) then opam should explain a bit harder about thePATH
adjustments it needs to make, and do some additional searching for Git-for-WindowsThe text was updated successfully, but these errors were encountered: