This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: winpty injection


Hi Thomas,

On Thu, 5 Apr 2018, Thomas Wolff wrote:

> Am 05.04.2018 um 15:25 schrieb Johannes Schindelin:
> >
> > On Thu, 5 Apr 2018, Corinna Vinschen wrote:
> >
> > > On Apr  4 19:07, Thomas Wolff wrote:
> > >
> > > > * As some people may object such a magic (and it might in fact raise
> > > > unexpected problems), it could also be made dependent on a setting in
> > > > the
> > > > CYGWIN environment variable.
> > >
> > > Nah.  If it improves the situation, nobody will complain.  However, it
> > > may slow down calling native Windows apps considerably when used a lot
> > > from scripts.
> >
> > We suggest `winpty` quite a bit in Git for Windows' bug tracker. And it is
> > not without problems... for example, when calling Maven in MinTTY via
> > `winpty mvn`, the `TERM` variable is still set as appropriate for MinTTY,
> > and consequently, the color codes of Maven's output show up as ugly
> > special characters...
>
> This sounds weird, as ANSI colour controls do not differ among
> terminals. What if you set TERM=cygwin or unset TERM before `winpty
> mvn`?  What's even weirder is that I cannot even reproduce the test
> case, as `winpty mvn` tells me "Could not start 'mvn.exe': The system
> could not find the file.  (error 0x2)", although `mvn` works.

In Git for Windows, we set `TERM=xterm`, not `TERM=cygwin` before
launching MinTTY. That might explain the difference?

Also, the reporter claimed the same about `winpty mvn`, as winpty does not
use the shell to execute shell scripts on the `PATH`, and the solution was
to run `winpty sh $(which mvn)`.

See
https://github.com/git-for-windows/git/issues/1470#issuecomment-365618938
for details.

Ciao,
Johannes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]