mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00: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
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							71efaf097b
						
					
				
				
					commit
					882237120e
				
			| @@ -803,6 +803,10 @@ class EsphomeCore: | |||||||
|             raise TypeError( |             raise TypeError( | ||||||
|                 f"Library {library} must be instance of Library, not {type(library)}" |                 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 = ( |         short_name = ( | ||||||
|             library.name if "/" not in library.name else library.name.split("/")[-1] |             library.name if "/" not in library.name else library.name.split("/")[-1] | ||||||
|         ) |         ) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user