Skip to content

Commit e6d0fa4

Browse files
dschoGit for Windows Build Agent
authored andcommitted
mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
To support Git Bash running in a MinTTY, we use a dirty trick to access the MSYS2 pseudo terminal: we execute a Bash snippet that accesses /dev/tty. The idea was to fall back to writing to/reading from CONOUT$/CONIN$ if that Bash call failed because Bash was not found. However, we should fall back even in other error conditions, because we have not successfully read the user input. Let's make it so. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 2a87d30 commit e6d0fa4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compat/terminal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ char *git_terminal_prompt(const char *prompt, int echo)
483483

484484
/* try shell_prompt first, fall back to CONIN/OUT if bash is missing */
485485
char *result = shell_prompt(prompt, echo);
486-
if (result || errno != ENOENT)
486+
if (result)
487487
return result;
488488

489489
#endif

0 commit comments

Comments
 (0)