From 8b3977da6e3a275185915f5ae0f72d3138941b2f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 29 Sep 2015 22:47:34 +0200 Subject: [PATCH] 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 --- git-gui/git-gui.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh index 0f9f4ac68ea9f5..ebd4da7930498f 100755 --- a/git-gui/git-gui.sh +++ b/git-gui/git-gui.sh @@ -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 }