git-gui: fix detection of Cygwin

MSys2 might *look* like Cygwin, but it is *not* Cygwin... Unless it
is run with `MSYSTEM=MSYS`, that is.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2015-09-29 22:47:34 +02:00
parent bd98852859
commit cb09dbbdea

View File

@@ -270,12 +270,10 @@ proc is_Windows {} {
proc is_Cygwin {} {
global _iscygwin
if {$_iscygwin eq {}} {
if {$::tcl_platform(platform) eq {windows}} {
if {[catch {set p [exec cygpath --windir]} err]} {
set _iscygwin 0
} else {
set _iscygwin 1
}
if {$::tcl_platform(platform) eq {windows} &&
(![info exists ::env(MSYSTEM)] ||
$::env(MSYSTEM) eq {MSYS})} {
set _iscygwin 1
} else {
set _iscygwin 0
}