mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05:00 
			
		
		
		
	Ignoring error if creds_example.yml fails to generate, as this happens in docker containers
This commit is contained in:
		@@ -37,8 +37,15 @@ public sealed class BotCredsProvider : IBotCredsProvider
 | 
				
			|||||||
    public BotCredsProvider(int? totalShards = null)
 | 
					    public BotCredsProvider(int? totalShards = null)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        _totalShards = totalShards;
 | 
					        _totalShards = totalShards;
 | 
				
			||||||
 | 
					        try
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            if (!File.Exists(CredsExamplePath))
 | 
					            if (!File.Exists(CredsExamplePath))
 | 
				
			||||||
                File.WriteAllText(CredsExamplePath, Yaml.Serializer.Serialize(_creds));
 | 
					                File.WriteAllText(CredsExamplePath, Yaml.Serializer.Serialize(_creds));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        catch
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            // this can fail in docker containers
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        MigrateCredentials();
 | 
					        MigrateCredentials();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user