mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	
							parent
							
								
									f7683173f8
								
							
						
					
					
						commit
						1fa3ba61c8
					
				@ -45,6 +45,10 @@ def cfg(ctx: click.Context, key: str, value: str, unset: bool, list_: bool) -> N
 | 
			
		||||
 | 
			
		||||
    if not data:
 | 
			
		||||
        log.warning(f"{config_path} has no configuration data, yet")
 | 
			
		||||
        # yaml.load() returns `None` if the input data is blank instead of a usable object
 | 
			
		||||
        # force a usable object by making one and removing the only item within it
 | 
			
		||||
        data = yaml.load("""__TEMP__: null""")
 | 
			
		||||
        del data["__TEMP__"]
 | 
			
		||||
 | 
			
		||||
    if list_:
 | 
			
		||||
        yaml.dump(data, sys.stdout)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user