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 Sep 24, 2016
1 parent ecdc907 commit 8b3977d
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) eq {MSYS})} {
set _iscygwin 1
} else {
set _iscygwin 0
}
Expand Down

0 comments on commit 8b3977d

Please sign in to comment.