mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
Improve error reporting for add_library (#10226)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
Jesse Hills
parent
3c7865cd6f
commit
80970f972b
@@ -803,6 +803,10 @@ class EsphomeCore:
|
||||
raise TypeError(
|
||||
f"Library {library} must be instance of Library, not {type(library)}"
|
||||
)
|
||||
|
||||
if not library.name:
|
||||
raise ValueError(f"The library for {library.repository} must have a name")
|
||||
|
||||
short_name = (
|
||||
library.name if "/" not in library.name else library.name.split("/")[-1]
|
||||
)
|
||||
|
Reference in New Issue
Block a user