mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Raise exception when try to load non-PIO project
This commit is contained in:
@ -23,7 +23,7 @@ from platformio.managers.package import PackageManager
|
|||||||
CORE_PACKAGES = {
|
CORE_PACKAGES = {
|
||||||
"contrib-piohome": ">=0.3.2,<2",
|
"contrib-piohome": ">=0.3.2,<2",
|
||||||
"pysite-pioplus": ">=0.4.2,<2",
|
"pysite-pioplus": ">=0.4.2,<2",
|
||||||
"tool-pioplus": ">=0.10.13,<2",
|
"tool-pioplus": ">=0.11.0,<2",
|
||||||
"tool-unity": "~1.20302.1",
|
"tool-unity": "~1.20302.1",
|
||||||
"tool-scons": "~3.20501.2"
|
"tool-scons": "~3.20501.2"
|
||||||
}
|
}
|
||||||
|
@ -331,11 +331,10 @@ def get_projectdata_dir():
|
|||||||
|
|
||||||
def load_project_config(path=None):
|
def load_project_config(path=None):
|
||||||
if not path or isdir(path):
|
if not path or isdir(path):
|
||||||
project_dir = path or get_project_dir()
|
path = join(path or get_project_dir(), "platformio.ini")
|
||||||
if not is_platformio_project(project_dir):
|
if not isfile(path):
|
||||||
raise exception.NotPlatformIOProject(project_dir)
|
raise exception.NotPlatformIOProject(
|
||||||
path = join(project_dir, "platformio.ini")
|
dirname(path) if path.endswith("platformio.ini") else path)
|
||||||
assert isfile(path)
|
|
||||||
cp = ProjectConfig()
|
cp = ProjectConfig()
|
||||||
cp.read(path)
|
cp.read(path)
|
||||||
return cp
|
return cp
|
||||||
|
Reference in New Issue
Block a user