Skip to content

Commit cda8676

Browse files
committed
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 <[email protected]>
1 parent 987604b commit cda8676

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

git-gui/git-gui.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,10 @@ proc is_Windows {} {
270270
proc is_Cygwin {} {
271271
global _iscygwin
272272
if {$_iscygwin eq {}} {
273-
if {$::tcl_platform(platform) eq {windows}} {
274-
if {[catch {set p [exec cygpath --windir]} err]} {
275-
set _iscygwin 0
276-
} else {
277-
set _iscygwin 1
278-
}
273+
if {$::tcl_platform(platform) eq {windows} &&
274+
(![info exists ::env(MSYSTEM)] ||
275+
$::env(MSYSTEM) eq {MSYS})} {
276+
set _iscygwin 1
279277
} else {
280278
set _iscygwin 0
281279
}

0 commit comments

Comments
 (0)