parameters: ()
return_statement: return (shell, msys)
docstring: For msys compatibility on windows, honor the SHELL environment variable,
      and if $MSYSTEM == MINGW32, run commands through $SHELL -c instead of
      letting Python use the system shell.
docstring_summary: For msys compatibility on windows, honor the SHELL environment variable,
      and if $MSYSTEM == MINGW32, run commands through $SHELL -c instead of
      letting Python use the system shell.
docstring_tokens: For msys compatibility on windows honor the SHELL environment variable and if $MSYSTEM == MINGW32 run commands through $SHELL - c instead of letting Python use the system shell .
function: def checkmsyscompat():
      """For msys compatibility on windows, honor the SHELL environment variable,
      and if $MSYSTEM == MINGW32, run commands through $SHELL -c instead of
      letting Python use the system shell."""
      if 'SHELL' in os.environ:
          shell = os.environ['SHELL']
      elif 'MOZILLABUILD' in os.environ:
          shell = os.environ['MOZILLABUILD'] + '/msys/bin/sh.exe'
      elif 'COMSPEC' in os.environ:
          shell = os.environ['COMSPEC']
      else:
          raise DataError("Can't find a suitable shell!")
  
      msys = False
      if 'MSYSTEM' in os.environ and os.environ['MSYSTEM'] == 'MINGW32':
          msys = True
          if not shell.lower().endswith(".exe"):
              shell += ".exe"
      return (shell, msys)
function_tokens: def checkmsyscompat ( ) : if 'SHELL' in os . environ : shell = os . environ [ 'SHELL' ] elif 'MOZILLABUILD' in os . environ : shell = os . environ [ 'MOZILLABUILD' ] + '/msys/bin/sh.exe' elif 'COMSPEC' in os . environ : shell = os . environ [ 'COMSPEC' ] else : raise DataError ( "Can't find a suitable shell!" ) msys = False if 'MSYSTEM' in os . environ and os . environ [ 'MSYSTEM' ] == 'MINGW32' : msys = True if not shell . lower ( ) . endswith ( ".exe" ) : shell += ".exe" return ( shell , msys )