Do not overwrite project configuration variables when system environment variables are set

This commit is contained in:
Ivan Kravets
2017-02-18 18:28:05 +02:00
parent c098b8bbca
commit 2467d5a5d0
3 changed files with 10 additions and 3 deletions

View File

@ -34,6 +34,8 @@ PlatformIO 3.0
* Use C++11 by default for CLion IDE based projects
(`pull #873 <https://github.com/platformio/platformio-core/pull/873>`_)
* Escape project path when Glob matching is used
* Do not overwrite project configuration variables when system environment
variables are set
* Fixed package installing with VCS branch for Python 2.7.3
(`issue #885 <https://github.com/platformio/platformio-core/issues/885>`_)
@ -68,7 +70,7 @@ PlatformIO 3.0
* Development platform `Linux ARM <https://github.com/platformio/platform-linux_arm>`__
+ Added support for Samsung ARTIK boards (520, 710, 1020) and ARTIK SDK
+ Added support for Samsung ARTIK boards (520, 530, 710, 1020) and ARTIK SDK
(`issue #353 <https://github.com/platformio/platformio-core/issues/353>`_)
* Development platform `Nordic nRF51 <https://github.com/platformio/platform-nordicnrf51>`__

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 3, "0a10")
VERSION = (3, 3, "0a11")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -117,8 +117,13 @@ elif not int(ARGUMENTS.get("PIOVERBOSE", 0)):
for var in ("BUILD_FLAGS", "SRC_BUILD_FLAGS", "SRC_FILTER", "EXTRA_SCRIPT",
"UPLOAD_PORT", "UPLOAD_FLAGS", "LIB_EXTRA_DIRS"):
k = "PLATFORMIO_%s" % var
if environ.get(k):
if k not in environ:
continue
if var in ("UPLOAD_PORT", "EXTRA_SCRIPT") or not env.get(var):
env[var] = environ.get(k)
else:
env[var] = "%s%s%s" % (environ.get(k), ", "
if var == "LIB_EXTRA_DIRS" else " ", env[var])
# Parse comma separated items
for opt in ("PIOFRAMEWORK", "LIB_DEPS", "LIB_IGNORE", "LIB_EXTRA_DIRS"):