diff --git a/HISTORY.rst b/HISTORY.rst index 33737527..ab73f480 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -30,10 +30,11 @@ PlatformIO Core 6 - Do not resolve dependencies from the project "src" folder when the `test_build_src `__ option is not enabled - Fixed an issue when a custom `pio test --project-config `__ was not handled properly (`issue #4299 `_) -* Allowed to ``Import("projenv")`` in a library extra script (`issue #4305 `_) -* Improved a serial port finder for a board with predefined HWIDs * Documented `Stringification `__ – converting a macro argument into a string constant (`issue #4310 `_) * Added ``env.StringifyMacro(value)`` helper function for the `Advanced Scripting `__ +* Allowed to ``Import("projenv")`` in a library extra script (`issue #4305 `_) +* Improved a serial port finder for a board with predefined HWIDs +* Fixed an issue when `build_unflags `__ operation ignores a flag value (`issue #4309 `_) 6.0.2 (2022-06-01) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 3334e978..59eb6387 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -258,7 +258,9 @@ def ProcessUnFlags(env, flags): for current in env.get(key, []): conditions = [ unflag == current, - isinstance(current, (tuple, list)) and unflag[0] == current[0], + not isinstance(unflag, (tuple, list)) + and isinstance(current, (tuple, list)) + and unflag == current[0], ] if any(conditions): env[key].remove(current)