mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 02:27:13 +02:00
Moved configuration code to a separate function, re-use it for PIO Core+
This commit is contained in:
@ -80,8 +80,7 @@ def process_result(ctx, result, force, caller): # pylint: disable=W0613
|
|||||||
maintenance.on_platformio_end(ctx, result)
|
maintenance.on_platformio_end(ctx, result)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def configure():
|
||||||
try:
|
|
||||||
if "cygwin" in system().lower():
|
if "cygwin" in system().lower():
|
||||||
raise exception.CygwinEnvDetected()
|
raise exception.CygwinEnvDetected()
|
||||||
|
|
||||||
@ -114,6 +113,10 @@ def main():
|
|||||||
click.echo = lambda *args, **kwargs: _safe_echo(0, *args, **kwargs)
|
click.echo = lambda *args, **kwargs: _safe_echo(0, *args, **kwargs)
|
||||||
click.secho = lambda *args, **kwargs: _safe_echo(1, *args, **kwargs)
|
click.secho = lambda *args, **kwargs: _safe_echo(1, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
try:
|
||||||
|
configure()
|
||||||
cli(None, None, None)
|
cli(None, None, None)
|
||||||
except Exception as e: # pylint: disable=W0703
|
except Exception as e: # pylint: disable=W0703
|
||||||
if not isinstance(e, exception.ReturnErrorCode):
|
if not isinstance(e, exception.ReturnErrorCode):
|
||||||
|
Reference in New Issue
Block a user