Skip to content

Commit 0c20511

Browse files
committed
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 <[email protected]>
1 parent e8e49b4 commit 0c20511

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/terminal.c

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

260260
/* try shell_prompt first, fall back to CONIN/OUT if bash is missing */
261261
char *result = shell_prompt(prompt, echo);
262-
if (result || errno != ENOENT)
262+
if (result)
263263
return result;
264264

265265
#endif

0 commit comments

Comments
 (0)