Skip to content

Commit 72cc6b7

Browse files
committed
fixup! git-gui: fix detection of Cygwin
1 parent 973d6b7 commit 72cc6b7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

git-gui/git-gui.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,12 @@ proc is_Windows {} {
270270
proc is_Cygwin {} {
271271
global _iscygwin
272272
if {$_iscygwin eq {}} {
273-
if {$::tcl_platform(platform) eq {windows} &&
274-
(![info exists ::env(MSYSTEM)] ||
275-
$::env(MSYSTEM) eq {MSYS})} {
276-
set _iscygwin 1
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+
}
277279
} else {
278280
set _iscygwin 0
279281
}

0 commit comments

Comments
 (0)