Handle caller id from os environment

This commit is contained in:
Ivan Kravets
2016-01-23 21:01:25 +02:00
parent c29399944e
commit 870b306b86
2 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,7 @@
import sys
VERSION = (2, 7, "2.dev5")
VERSION = (2, 7, "2.dev6")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -71,6 +71,8 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904
@click.option("--caller", "-c", help="Caller ID (service).")
@click.pass_context
def cli(ctx, force, caller):
if not caller and getenv("PLATFORMIO_CALLER"):
caller = getenv("PLATFORMIO_CALLER")
maintenance.on_platformio_start(ctx, force, caller)