forked from platformio/platformio-core
Fix Cygwin disabling
This commit is contained in:
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
from os import listdir
|
from os import listdir
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
from platform import system
|
||||||
from sys import exit as sys_exit
|
from sys import exit as sys_exit
|
||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
|
|
||||||
@ -70,6 +71,9 @@ def process_result(ctx, result, force, caller): # pylint: disable=W0613
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
try:
|
try:
|
||||||
|
if "cygwin" in system().lower():
|
||||||
|
raise exception.CygwinEnvDetected()
|
||||||
|
|
||||||
# https://urllib3.readthedocs.org
|
# https://urllib3.readthedocs.org
|
||||||
# /en/latest/security.html#insecureplatformwarning
|
# /en/latest/security.html#insecureplatformwarning
|
||||||
try:
|
try:
|
||||||
|
@ -115,10 +115,6 @@ def get_systype():
|
|||||||
data = uname()
|
data = uname()
|
||||||
type_ = data[0].lower()
|
type_ = data[0].lower()
|
||||||
arch = data[4].lower() if data[4] else ""
|
arch = data[4].lower() if data[4] else ""
|
||||||
|
|
||||||
if "cygwin" in type_:
|
|
||||||
raise exception.CygwinEnvDetected()
|
|
||||||
|
|
||||||
return "%s_%s" % (type_, arch) if arch else type_
|
return "%s_%s" % (type_, arch) if arch else type_
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user