diff --git a/platformio/commands/run.py b/platformio/commands/run.py index 49d5e23f..4b8ec5b2 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -192,8 +192,7 @@ def _autoinstall_platform(ctx, platform, targets): cmd_options['with_package'] = ["uploader"] elif (platform in installed_platforms and - set(p.pkg_aliases_to_names(["toolchain"])) <= - set(p.get_installed_packages())): + set(p.get_default_packages()) <= set(p.get_installed_packages())): return if (not app.get_setting("enable_prompts") or diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 7dd2732f..8874e7f3 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -242,6 +242,10 @@ class BasePlatform(object): names.append(name) return names + def get_default_packages(self): + return [k for k, v in self.get_packages().items() + if v.get("default", False)] + def get_installed_packages(self): pm = PackageManager() return [n for n in self.get_packages().keys() if pm.is_installed(n)]