diff --git a/HISTORY.rst b/HISTORY.rst index e4d63f26..ebb34014 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 3.0 3.4.1 (2017-??-??) ~~~~~~~~~~~~~~~~~~ +* Do not ask for board ID when initialize project for desktop platform * Fixed issue when can not load broken PIO Core state 3.4.0 (2017-06-26) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 564010a1..ac16bb7e 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -123,13 +123,14 @@ def get_best_envname(project_dir, boards=None): "env_default").split(", ")[0].strip() if env_default: return env_default + section = None for section in config.sections(): if not section.startswith("env:"): continue elif config.has_option(section, "board") and (not boards or config.get( section, "board") in boards): - return section[4:] - return None + break + return section[4:] if section else None def init_base_project(project_dir):