Pass all PIO variables to PlatformManager

This commit is contained in:
Ivan Kravets
2016-12-02 19:21:56 +02:00
parent aac627abf4
commit 25c979a8ee
2 changed files with 4 additions and 4 deletions

View File

@ -74,6 +74,7 @@ DEFAULT_ENV_OPTIONS = dict(
variables=commonvars,
# Propagating External Environment
PIOVARIABLES=commonvars.keys(),
ENV=environ,
UNIX_TIME=int(time()),
PROGNAME="program",

View File

@ -30,10 +30,9 @@ def initPioPlatform(name):
def PioPlatform(env):
variables = {}
for key in ("board", "pioframework"):
if key.upper() not in env:
continue
variables[key] = env[key.upper()]
for name in env['PIOVARIABLES']:
if name in env:
variables[name.lower()] = env[name]
p = initPioPlatform(env['PLATFORM_MANIFEST'])
p.configure_default_packages(variables, COMMAND_LINE_TARGETS)
return p