Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Some) interactive commands unusable with git-bash.exe #399

Closed
harriha opened this issue Sep 17, 2015 · 6 comments · Fixed by git-for-windows/build-extra#78
Closed

(Some) interactive commands unusable with git-bash.exe #399

harriha opened this issue Sep 17, 2015 · 6 comments · Fixed by git-for-windows/build-extra#78

Comments

@harriha
Copy link

harriha commented Sep 17, 2015

Hi,

Did a bit of searching, but couldn't find an issue about this - which, to be honest, is surprising. If there's an issue about this already, please feel free to close this one.

  • Have latest portable version available (2.5.2.2, 64bit) (reproducable also in 2.5.1, didn't test other 2.x releases)
  • Have PostgreSQL installed and configured properly (= binaries in PATH) with a password
  • Open git-bash.exe from Explorer
  • Type psql

Expected:

  • There's a prompt asking the user to type in the password

Actual:

  • Shell does nothing, seems to hang, need to exit with Ctrl-C

The same works fine if running the command from bin/bash.exe. Also, with the old 1.9.5 version of msysgit this works fine. I'm on Windows 8.1.

Encountered this with psql, but this might be a common thing with some other similar interactive programs?

$ git --version
git version 2.5.2.windows.2

$ psql --version
psql (PostgreSQL) 9.4.1

$ which psql
/c/Program Files/PostgreSQL/9.4/bin/psql

$ psql
 // nothing...
@dscho
Copy link
Member

dscho commented Sep 17, 2015

Isn't this covered in the Release Notes?

  • Some console programs interact correctly with MinTTY only when called through winpty (e.g. the Python console needs to be started as winpty python instead of just python).

@dscho dscho added the question label Sep 17, 2015
@harriha
Copy link
Author

harriha commented Sep 17, 2015

Oh shoot, of course it is - and now I remember reading that multiple times earlier. Yeah, never mind, sorry for the noise, closing.

@harriha harriha closed this as completed Sep 17, 2015
@dscho
Copy link
Member

dscho commented Sep 17, 2015

@harriha Maybe you have an idea how to solve that? Maybe we could set some aliases, e.g. something like

case "$TERM" in
xterm*)
    # The following programs are known to require a Win32 Console
    # for interactive usage, therefore let's launch them through winpty
    # when run inside `mintty`.
    for name in node php php5 psql python2.7
    do
        alias $name="winpty $name.exe"
    done
    ;;
esac

in /etc/profile.d/aliases.sh? Could you test whether that works okay?

@harriha
Copy link
Author

harriha commented Sep 17, 2015

@dscho Seems to work fine based on a quick test, thanks. Looks like a nice workaround, but I guess that doesn't really scale too well? Obviously, if there's no other ways to around this, this is much better than nothing - just should make it very clear (everywhere) that "if your interactive program seems to hang, do this-and-this". Otherwise, and probably even with such notice, there's going to be these kind of issues popping in continuously :).

@dscho
Copy link
Member

dscho commented Sep 17, 2015

Otherwise, and probably even with such notice, there's going to be these kind of issues popping in continuously :).

I agree. It is of no use pointing out that we try to support Git here, and not a bazillion of interactive consoles for other software.

BTW can you think of more interactive interpreters than the ones I had listed?

@dscho dscho self-assigned this Sep 17, 2015
@dscho dscho reopened this Sep 17, 2015
dscho added a commit to dscho/build-extra that referenced this issue Sep 17, 2015
This patch adds support for a couple of interactive consoles that users
invariably want to run in their Git Bash (despite our clear warning in the
release notes and the installer; Who reads text anyways?).

Of course, the list is non-exhaustive. The idea is that we can extend this
whenever needed. Or even better: users can extend this as needed and make
a Pull Request, in true Open Source style facilitated by... *drumroll*...
Git.

This fixes git-for-windows/git#399 and
git-for-windows/git#400

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Sep 17, 2015

Let's continue the discussion in git-for-windows/build-extra#78

@dscho dscho closed this as completed Sep 17, 2015
jeffhostetler pushed a commit to jeffhostetler/git that referenced this issue Aug 18, 2021
…lers

Implement workflow to create GitHub release with attached `git` installers
mjcheetham pushed a commit to mjcheetham/git that referenced this issue Jul 23, 2024
…lers

Implement workflow to create GitHub release with attached `git` installers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants