Skip to content

Commit

Permalink
Fixed an issue when booleans in "platformio.ini" are not parsed prope…
Browse files Browse the repository at this point in the history
…rly // Resolve #3022
  • Loading branch information
ivankravets committed Oct 24, 2019
1 parent 70b484a commit 3177aaf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ PlatformIO Core 4.0
* Fixed an issue with linking process when ``$LDSCRIPT`` contains a space in path
* Fixed security issue when extracting items from TAR archive (`issue #2995 <https://github.com/platformio/platformio-core/issues/2995>`_)
* Fixed an issue with project generator when ``src_build_flags`` were not respected (`issue #3137 <https://github.com/platformio/platformio-core/issues/3137>`_)
* Fixed an issue when booleans in "platformio.ini" are not parsed properly (`issue #3022 <https://github.com/platformio/platformio-core/issues/3022>`_)

4.0.3 (2019-08-30)
~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 1 files
+2 −2 projectconf.rst
10 changes: 8 additions & 2 deletions platformio/builder/tools/pioplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ def LoadPioPlatform(env):
# update board manifest with overridden data from INI config
board_config = env.BoardConfig()
for option, value in env.GetProjectOptions():
if option.startswith("board_"):
board_config.update(option.lower()[6:], value)
if not option.startswith("board_"):
continue
option = option.lower()[6:]
if isinstance(board_config.get(option), bool):
value = str(value).lower() in ("1", "yes", "true")
elif isinstance(board_config.get(option), int):
value = int(value)
board_config.update(option, value)

# load default variables from board config
for option_meta in ProjectOptions.values():
Expand Down

0 comments on commit 3177aaf

Please sign in to comment.