mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Do not install tool-unity for even non-test proejct
This commit is contained in:
@ -59,7 +59,7 @@ def _dump_includes(env):
|
||||
includes["toolchain"].extend([os.path.realpath(inc) for inc in glob(g)])
|
||||
|
||||
includes["unity"] = []
|
||||
unity_dir = get_core_package_dir("tool-unity")
|
||||
unity_dir = get_core_package_dir("tool-unity", auto_install=False)
|
||||
if unity_dir:
|
||||
includes["unity"].append(unity_dir)
|
||||
|
||||
|
@ -27,7 +27,7 @@ from platformio.package.meta import PackageItem, PackageSpec
|
||||
from platformio.proc import get_pythonexe_path
|
||||
|
||||
|
||||
def get_core_package_dir(name):
|
||||
def get_core_package_dir(name, auto_install=True):
|
||||
if name not in __core_packages__:
|
||||
raise exception.PlatformioException("Please upgrade PlatformIO Core")
|
||||
pm = ToolPackageManager()
|
||||
@ -37,6 +37,8 @@ def get_core_package_dir(name):
|
||||
pkg = pm.get_package(spec)
|
||||
if pkg:
|
||||
return pkg.path
|
||||
if not auto_install:
|
||||
return None
|
||||
assert pm.install(spec)
|
||||
_remove_unnecessary_packages()
|
||||
return pm.get_package(spec).path
|
||||
|
Reference in New Issue
Block a user