forked from platformio/platformio-core
Allow auto-installation of platforms when prompts are disabled // Resolve #43
This commit is contained in:
@@ -15,7 +15,8 @@ Release History
|
||||
*MCUs* (`issue #35 <https://github.com/ivankravets/platformio/issues/35>`_)
|
||||
* Automatic detection of port on `platformio serialports monitor <http://docs.platformio.ikravets.com/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_
|
||||
(`issue #37 <https://github.com/ivankravets/platformio/issues/37>`_)
|
||||
* Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 <https://github.com/ivankravets/platformio/issues/39>`_)
|
||||
* Allowed auto-installation of platforms when prompts are disabled (`issue #43 <https://github.com/ivankravets/platformio/issues/43>`_)
|
||||
* Fixed urllib3's *SSL* warning under Python <= 2.7.2 (`issue #39 <https://github.com/ivankravets/platformio/issues/39>`_)
|
||||
* Fixed bug with *Arduino USB* boards (`issue #40 <https://github.com/ivankravets/platformio/issues/40>`_)
|
||||
|
||||
0.9.2 (2014-12-10)
|
||||
|
@@ -68,10 +68,12 @@ def process_environment(ctx, name, options, targets, upload_port):
|
||||
|
||||
telemetry.on_run_environment(options, envtargets)
|
||||
|
||||
if (app.get_setting("enable_prompts") and
|
||||
platform not in PlatformFactory.get_platforms(installed=True) and
|
||||
installed_platforms = PlatformFactory.get_platforms(
|
||||
installed=True).keys()
|
||||
if (platform not in installed_platforms and (
|
||||
not app.get_setting("enable_prompts") or
|
||||
click.confirm("The platform '%s' has not been installed yet. "
|
||||
"Would you like to install it now?" % platform)):
|
||||
"Would you like to install it now?" % platform))):
|
||||
ctx.invoke(cmd_install, platforms=[platform])
|
||||
|
||||
p = PlatformFactory.newPlatform(platform)
|
||||
|
@@ -21,7 +21,7 @@ def cli(ctx, platform):
|
||||
installed=True).keys()
|
||||
|
||||
if platform not in installed_platforms:
|
||||
if (app.get_setting("enable_prompts") and
|
||||
if (not app.get_setting("enable_prompts") or
|
||||
click.confirm("The platform '%s' has not been installed yet. "
|
||||
"Would you like to install it now?" % platform)):
|
||||
ctx.invoke(cmd_install, platforms=[platform])
|
||||
|
Reference in New Issue
Block a user