mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Fix environment-to-ini inherited key bug (#27543)
				
					
				
			Fix #27541 The INI package has a quirk: by default, the keys are inherited. When maintaining the keys, the newly added sub key should not be affected by the parent key.
This commit is contained in:
		@@ -149,8 +149,9 @@ func EnvironmentToConfig(cfg ConfigProvider, envs []string) (changed bool) {
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		key := section.Key(keyName)
 | 
			
		||||
		key := ConfigSectionKey(section, keyName)
 | 
			
		||||
		if key == nil {
 | 
			
		||||
			changed = true
 | 
			
		||||
			key, err = section.NewKey(keyName, keyValue)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				log.Error("Error creating key: %s in section: %s with value: %s : %v", keyName, sectionName, keyValue, err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user