Skip to content

Commit

Permalink
launch git configuration only if tty
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Dec 14, 2023
1 parent c32bd5b commit c14e3a5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/client/opamClient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -711,14 +711,17 @@ let git_for_windows_check =
header ();
get_gitbin ~gitbin:(OpamFilename.Dir.to_string gitbin) ()
| None ->
header ();
OpamConsole.msg
"Cygwin Git is functional but have credentials issues, \
we recommend using:\n%s\n"
(OpamStd.Format.itemize (fun s -> s)
[ "winget with 'winget install Git.Git'";
"Git for Windows available at https://gitforwindows.org" ]);
menu ()
if OpamStd.Sys.tty_out then
(header ();
OpamConsole.msg
"Cygwin Git is functional but have credentials issues, \
we recommend using:\n%s\n"
(OpamStd.Format.itemize (fun s -> s)
[ "winget with 'winget install Git.Git'";
"Git for Windows available at https://gitforwindows.org" ]);
menu ())
else
None
in
OpamStd.Option.iter (fun _ ->
OpamConsole.msg
Expand Down

0 comments on commit c14e3a5

Please sign in to comment.