mirror of
https://github.com/git/git.git
synced 2026-01-31 13:03:13 +00:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user