Skip to content

Commit

Permalink
Fixed an issue when env.BoardConfig() does not work for custom bo…
Browse files Browse the repository at this point in the history
…ards in extra scripts of libraries // Resolve #3264
  • Loading branch information
ivankravets committed Nov 12, 2019
1 parent cbb7869 commit c6a8e03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ PlatformIO Core 4.0

* Handle project configuration (monitor, test, and upload options) for PIO Remote commands (`issue #2591 <https://github.com/platformio/platformio-core/issues/2591>`_)
* Fixed an issue with the broken latest news for PIO Home
* Fixed an issue when ``env.BoardConfig()`` does not work for custom boards in extra scripts of libraries (`issue #3264 <https://github.com/platformio/platformio-core/issues/3264>`_)

4.1.0 (2019-11-07)
~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 2 additions & 1 deletion platformio/builder/tools/pioplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def BoardConfig(env, board=None):
try:
board = board or env.get("BOARD")
assert board, "BoardConfig: Board is not defined"
config = p.board_config(board)
with fs.cd(env.subst("$PROJECT_DIR")):
config = p.board_config(board)
except (AssertionError, exception.UnknownBoard) as e:
sys.stderr.write("Error: %s\n" % str(e))
env.Exit(1)
Expand Down

0 comments on commit c6a8e03

Please sign in to comment.