forked from platformio/platformio-core
Show error when boards manifest doesn't contain required fields
This commit is contained in:
@ -45,7 +45,7 @@ class UnknownPlatform(PlatformioException):
|
||||
class PlatformNotInstalledYet(PlatformioException):
|
||||
|
||||
MESSAGE = "The platform '{0}' has not been installed yet. "\
|
||||
"Use `platformio platforms install {0}` command"
|
||||
"Use `platformio platform install {0}` command"
|
||||
|
||||
|
||||
class BoardNotDefined(PlatformioException):
|
||||
|
@ -496,7 +496,10 @@ class PlatformBoardConfig(object):
|
||||
self._manifest = util.load_json(manifest_path)
|
||||
except ValueError:
|
||||
raise exception.InvalidBoardManifest(manifest_path)
|
||||
assert set(["name", "url", "vendor"]) <= set(self._manifest.keys())
|
||||
if not set(["name", "url", "vendor"]) <= set(self._manifest.keys()):
|
||||
raise exception.PlatformioException(
|
||||
"Please specify name, url and vendor fields for " +
|
||||
manifest_path)
|
||||
|
||||
def get(self, path, default=None):
|
||||
try:
|
||||
|
Reference in New Issue
Block a user