You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ X] PlatformIO Core.
If you’ve found a bug, please provide an information below.
Configuration
Operating system: Linux, Windows 10, probably any other since the bug is in the core Python code
PlatformIO Version (platformio --version): PlatformIO Core, version 5.1.1
Description of problem
The documentation says:
PLATFORMIO_SRC_DIR¶
Allows one to override “platformio.ini” (Project Configuration File) option src_dir.
"Override" implies that, if the environment variable is present, it should take precedence over the value in platformio.ini.
Instead, if src_dir is present in platformio.ini, its value is used and the environment variable is ignored. Contrary to the documentation, the platformio.ini option overrides the environment variable.
This bug applies not only to PLATFORMIO_SRC_DIR, but also to every PLATFORMIO_*_DIR variable.
Steps to Reproduce
Using the minimal project shown below, run the following commands
pio run
PLATFORMIO_SRC_DIR=foobar pio run
Case 2 is shown in the Linux shell command form. On Windows you have to use a different way to set the environment variable - but it fails there too.
Actual Results
Both 1. and 2. succeed
Expected Results
Case 1 should succeed.
Case 2 should fail because overriding the source directory with the nonexistent path "foobar" should result in "Nothing to buld".
The reason is because line 252 of that file sets value from the option in the platformio.ini file, and the value == MISSING clause prevents it from being overridden.
The text was updated successfully, but these errors were encountered:
What kind of issue is this?
If you’ve found a bug, please provide an information below.
Configuration
Operating system: Linux, Windows 10, probably any other since the bug is in the core Python code
PlatformIO Version (
platformio --version
): PlatformIO Core, version 5.1.1Description of problem
The documentation says:
"Override" implies that, if the environment variable is present, it should take precedence over the value in platformio.ini.
Instead, if src_dir is present in platformio.ini, its value is used and the environment variable is ignored. Contrary to the documentation, the platformio.ini option overrides the environment variable.
This bug applies not only to PLATFORMIO_SRC_DIR, but also to every PLATFORMIO_*_DIR variable.
Steps to Reproduce
Using the minimal project shown below, run the following commands
Case 2 is shown in the Linux shell command form. On Windows you have to use a different way to set the environment variable - but it fails there too.
Actual Results
Both 1. and 2. succeed
Expected Results
Case 1 should succeed.
Case 2 should fail because overriding the source directory with the nonexistent path "foobar" should result in "Nothing to buld".
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
This file goes in src/main.c
Additional info
The buggy code is here .
It says
but it should say
The reason is because line 252 of that file sets
value
from the option in the platformio.ini file, and thevalue == MISSING
clause prevents it from being overridden.The text was updated successfully, but these errors were encountered: