Skip to content

Commit

Permalink
git-gui: fix detection of Cygwin
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dscho committed Jan 14, 2016
1 parent 551474c commit 72a9bd7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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) ne {MSYS})} {
set _iscygwin 1
} else {
set _iscygwin 0
}
Expand Down

0 comments on commit 72a9bd7

Please sign in to comment.