mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +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)
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
def configure():
|
||||
if "cygwin" in system().lower():
|
||||
raise exception.CygwinEnvDetected()
|
||||
|
||||
@ -114,6 +113,10 @@ def main():
|
||||
click.echo = lambda *args, **kwargs: _safe_echo(0, *args, **kwargs)
|
||||
click.secho = lambda *args, **kwargs: _safe_echo(1, *args, **kwargs)
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
configure()
|
||||
cli(None, None, None)
|
||||
except Exception as e: # pylint: disable=W0703
|
||||
if not isinstance(e, exception.ReturnErrorCode):
|
||||
|
Reference in New Issue
Block a user