Skip to content

Commit

Permalink
Change ARCH_IS_WINDOWS to return false if in full cygwin install
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Feb 23, 2021
1 parent 9396ef1 commit 25cfdd0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/system.g
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,20 @@ end );
## <Func Name="ARCH_IS_WINDOWS" Arg=''/>
##
## <Description>
## tests whether &GAP; is running on a Windows system in Cygwin.
## tests whether &GAP; is running on a Windows system without
## standard POSIX tools available (such as a shell).
## </Description>
## </ManSection>
## <#/GAPDoc>
##
BIND_GLOBAL("ARCH_IS_WINDOWS",function()
return POSITION_SUBSTRING (GAPInfo.Architecture, "cygwin", 0) <> fail;
# Exit early is we are not in Cygwin
if POSITION_SUBSTRING (GAPInfo.Architecture, "cygwin", 0) = fail then
return false;
fi;
# Check if programs we need exist in their standard Cygwin locations
return not IsExistingFile("/usr/bin/sh") or
not IsExistingFile("/usr/bin/xdg-open");
end);

#############################################################################
Expand Down

0 comments on commit 25cfdd0

Please sign in to comment.